passport._define('reg.js', function() {
	var passport = passport || window.passport || {}, baidu = passport.tangramInst
			|| baidu || window.baidu;
(function(b) {
		var a = {
			"http:" : "http://passport.bdimg.com",
			"https:" : "https://passport.baidu.com"
		};
		b.apiDomain = {
			staticDomain : a[window.location.protocol.toLowerCase()]
		}
	})(passport);
	var magic = null;
	if (typeof magic != "function") {
		var magic = function() {
		}
	}
	magic._baiduInstName = magic._baiduInstName || "bdInst_"
			+ new Date().getTime();
	var baiduInstance = baiduInstance || baidu.baiduInstance
			|| window.baiduInstance;
	window[magic._baiduInstName] = window[magic._baiduInstName]
			|| baiduInstance;
	magic.resourcePath = "";
	magic.skinName = "default";
	magic.version = "1.0.0.0";
	/msie 6/i.test(navigator.userAgent)
			&& document.execCommand("BackgroundImageCache", false, true);
	baidu.form = baidu.form || {};
	baidu.url = baidu.url || {};
	baidu.url.escapeSymbol = baidu.url.escapeSymbol || function(a) {
		return String(a).replace(/[#%&+=\/\\\ \　\f\r\n\t]/g, function(b) {
			return "%"
					+ (256 + b.charCodeAt()).toString(16).substring(1)
							.toUpperCase()
		})
	};
	baidu.form.json = baidu.form.json || function(c, e) {
		var b = c.elements, e = e || function(r, q) {
			return r
		}, h = {}, o, k, p, d, a, n, m, l;
		function f(q, r) {
			var s = h[q];
			if (s) {
				s.push || (h[q] = [s]);
				h[q].push(r)
			} else {
				h[q] = r
			}
		}
		for (var g = 0, j = b.length; g < j; g++) {
			o = b[g];
			p = o.name;
			if (!o.disabled && p) {
				k = o.type;
				d = baidu.url.escapeSymbol(o.value);
				switch (k) {
					case "radio" :
					case "checkbox" :
						if (!o.checked) {
							break
						}
					case "textarea" :
					case "text" :
					case "password" :
					case "hidden" :
					case "file" :
					case "select-one" :
						f(p, e(d, p));
						break;
					case "select-multiple" :
						a = o.options;
						m = a.length;
						for (n = 0; n < m; n++) {
							l = a[n];
							if (l.selected) {
								f(p, e(l.value, p))
							}
						}
						break
				}
			}
		}
		return h
	};
	magic.Base = function() {
		baidu.lang.Class.call(this);
		this._ids = {};
		this._eid = this.guid + "__"
	};
	baidu.lang.inherits(magic.Base, baidu.lang.Class, "magic.Base").extend({
		getElement : function(a) {
			return document.getElementById(this.$getId(a))
		},
		getElements : function() {
			var a = {};
			var c = this._ids;
			for (var b in c) {
				a[b] = this.getElement(b)
			}
			return a
		},
		$getId : function(a) {
			a = baidu.lang.isString(a) ? a : "";
			return this._ids[a] || (this._ids[a] = this._eid + a)
		},
		$mappingDom : function(a, b) {
			if (baidu.lang.isString(b)) {
				this._ids[a] = b
			} else {
				if (b && b.nodeType) {
					b.id ? this._ids[a] = b.id : b.id = this.$getId(a)
				}
			}
			return this
		},
		$dispose : function() {
			this.fire("ondispose")
					&& baidu.lang.Class.prototype.dispose.call(this)
		}
	});
	magic.control = magic.control || {};
(function() {
		magic.setup = magic.setup || function(h, d, e) {
			var g = c(h, "tang-param") || {};
			for (var f in e) {
				g[f] = e[f]
			}
			var k = new d(g);
			k.$mappingDom("", h);
			b(h, k.guid);
			var j = h.getElementsByTagName("*");
			for (var f = j.length - 1; f >= 0; f--) {
				b(j[f], k.guid)
			}
			return k
		};
		function c(h, d) {
			var k = h.getAttribute(d), j, g = false;
			if (k && (j = k.match(a[0]))) {
				g = {};
				for (var f = 0, e; f < j.length; f++) {
					e = j[f].match(a[1]);
					!isNaN(e[2]) && (e[2] = +e[2]);
					a[2].test(e[2]) && (e[2] = e[2].replace(a[3], "\x242"));
					a[4].test(e[2]) && (e[2] = a[5].test(e[2]));
					g[e[1]] = e[2]
				}
			}
			return g
		}
		var a = [/\b[\w\$\-]+\s*:\s*[^;]+/g, /([\w\$\-]+)\s*:\s*([^;]+)\s*/,
				/\'|\"/, /^\s*(\'|\")([^\1]*)\1\s*/, /^(true|false)\s*$/i,
				/\btrue\b/i];
		function b(g, d) {
			var f = c(g, "tang-event");
			if (f) {
				for (var e in f) {
					var h = f[e].substr(1);
					h.indexOf("(") < 0 && (h += "()");
					baidu.dom(g).on(
							e,
							new Function(magic._baiduInstName + "('" + d
									+ "') && " + magic._baiduInstName + "('"
									+ d + "')" + h))
				}
			}
		}
	})();
	magic.control.Layer = baidu.lang.createClass(function(a) {
				this.width = "auto";
				this.height = "auto";
				baidu.object.extend(this, a || {})
			}, {
				type : "magic.control.Layer",
				superClass : magic.Base
			}).extend({
				show : function() {
					if (this.fire("onbeforeshow")) {
						this.getElement().style.display = "";
						this.fire("onshow")
					}
				},
				hide : function() {
					if (this.fire("onbeforehide")) {
						this.getElement().style.display = "none";
						this.fire("onhide")
					}
				},
				setWidth : function(a) {
					baidu.dom.setPixel(this.getElement(), "width",
							(this.width = a))
				},
				setHeight : function(a) {
					baidu.dom.setPixel(this.getElement(), "height",
							(this.height = a))
				},
				setSize : function(a) {
					this.setWidth(a.width || a[0]);
					this.setHeight(a.height || a[1])
				}
			});
	magic.control.Popup = baidu.lang.createClass(function(a) {
				var b = this;
				b.visible = false;
				b.autoHide = true;
				b.hideOnEscape = true;
				b.disposeOnHide = false;
				b.smartPosition = false;
				b.offsetX = 0;
				b.offsetY = 0;
				baidu.object.extend(this, a || {});
				b._parent = null;
				b._host = null;
				b._init_control_popup()
			}, {
				superClass : magic.control.Layer,
				type : "magic.control.Popup"
			}).extend({
				setContent : function(a) {
					this.getElement("content").innerHTML = a
				},
				attach : function(b, a) {
					if (baidu.dom(b).size()) {
						baidu.object.extend(this, a || {});
						this._host = baidu(b)[0];
						this.show()
					}
				},
				reposition : function(b) {
					var d = this;
					!b && d._host && (b = baidu.dom(d._host).offset());
					if (b) {
						d.top = b.top + d.offsetY + d._host.offsetHeight;
						d.left = b.left + d.offsetX;
						d._resupinate = false;
						if (d.smartPosition) {
							var e = d.getElement().offsetHeight;
							var f = baidu.page.getViewHeight();
							var c = baidu.page.getScrollTop();
							var a = b.top - d.offsetY - e;
							if (d.top + e > c + f && a > c && a < c + f) {
								d.top = b.top - d.offsetY - e;
								d._resupinate = true
							}
						}
					}
					d.fire("reposition");
					d.setPosition([d.left, d.top])
				},
				setPosition : function(a) {
					this.setTop(a.top || a[1]);
					this.setLeft(a.left || a[0])
				},
				setTop : function(a) {
					baidu.dom(this.getElement()).css("top",
							(this.top = a) + "px")
				},
				setLeft : function(a) {
					baidu.dom(this.getElement()).css("left",
							(this.left = a) + "px")
				},
				_init_control_popup : function() {
					var f = this;
					function b() {
						f.reposition()
					}
					function e(h) {
						h.keyCode == 27 && f.hideOnEscape && f.autoHide
								&& f.hide()
					}
					function a() {
						var h = f;
						do {
							d[h.guid] = true
						} while (h = h._parent)
					}
					var g = baidu.global.get("popupList");
					var d = baidu.global.get("popupProtect");
					f.on("show", function() {
								f.reposition();
								setTimeout(function() {
											f.guid && (g[f.guid] = true)
										}, 1);
								f._host && baidu.dom(f._host).on("click", a);
								baidu.dom(f.getElement()).on("click", a);
								baidu.dom(window).on("resize", b);
								baidu.dom(document).on("keyup", e);
								f.width != "auto" && f.setWidth(f.width);
								f.height != "auto" && f.setHeight(f.height);
								f.visible = true
							});
					function c(h) {
						f.visible = false;
						delete g[f.guid];
						f._host && baidu.dom(f._host).off("click", a);
						baidu.dom(f.getElement()).off("click", a);
						baidu.dom(window).off("resize", b);
						baidu.dom(document).off("keyup", e);
						h && f.$dispose()
					}
					f.on("hide", function() {
								c(f.disposeOnHide)
							});
					f.on("dispose", function() {
								c(false)
							})
				}
			});
(function() {
		var c = baidu.global.set("popupList", {}, true);
		var a = baidu.global.set("popupProtect", {}, true);
		function b() {
			for (var e in c) {
				var d = baiduInstance(e);
				!a[e] && d.autoHide && d.hide()
			}
			for (var e in a) {
				delete a[e]
			}
		}
		baidu.dom(window).on("resize", b);
		baidu.dom(window).on("scroll", b);
		baidu.dom(document).on("click", b)
	})();
	magic.Background = baidu.lang.createClass(function(b) {
		var c = b || {}, d = this;
		d.coverable = c.coverable || false;
		d.styleBox = c.styleBox;
		d.tagName = "div";
		var a = "filter:progid:DXImageTransform.Microsoft.Alpha(opacity:0);position:absolute;z-index:-1;top:0;left:0;width:100%;height:100%;";
		d._coverDom = "<div style='" + a
				+ "opacity:0;background-color:#FFFFFF'></div>";
		var e = baidu.browser;
		e.ie < 7
				&& (d._coverDom = "<iframe frameborder='0' style='"
						+ a
						+ "' src='"
						+ (window.location.protocol.toLowerCase() == "https:"
								? "https://passport.baidu.com/passApi/html/_blank.html"
								: "about:blank") + "'></iframe>");
		if (e.ie && (!e.isStrict || e.ie < 8)) {
			d.size = [0, 0];
			d.timer = setInterval(function() {
						d._forIE()
					}, 80)
		}
		this._innerHTML = "<div class='tang-background-inner' style='width:100%;height:100%;' id='"
				+ this.$getId("inner") + "'></div>"
	}, {
		type : "magic.Background",
		superClass : magic.Base
	}).extend({
		render : function(a) {
			var b = baidu.dom(a).get(0);
			b != document.body && baidu.dom(b).css("position") == "static"
					&& (b.style.position = "relative");
			baidu.dom(b).insertHTML("afterbegin", this.toHTMLString())
		},
		$dispose : function() {
			var a = this.getElement();
			a.parentNode.removeChild(a);
			clearInterval(this.timer)
		},
		toHTMLString : function(a) {
			return [
					"<",
					(a || this.tagName),
					" class='tang-background",
					(baidu.browser.ie < 7 ? " ie6__" : ""),
					"' id='",
					this.$getId(),
					"' style='position:absolute; top:0px; left:0px;",
					(this.timer
							? "width:10px;height:10px;"
							: "width:100%;height:100%;"),
					"z-index:-9; -webkit-user-select:none; -moz-user-select:none;' ",
					"onselectstart='return false'>", this._innerHTML,
					(this.coverable ? this._coverDom || "" : ""), "</",
					(a || this.tagName), ">"].join("")
		},
		setContent : function(a) {
			this.getElement("inner").innerHTML = a
		},
		_forIE : function() {
			if (this.guid
					&& this.layer
					|| ((this.layer = this.getElement()) && this.layer.offsetHeight)) {
				var j = this.layer;
				var c = this.container || j.parentNode;
				if (c && c.style) {
					var m = c.style, l = parseInt(m.borderTopWidth) || 0, n = parseInt(m.borderRightWidth)
							|| 0, e = parseInt(m.borderBottomWidth) || 0, a = parseInt(m.borderLeftWidth)
							|| 0, k = c.offsetWidth - n - a, b = c.offsetHeight
							- l - e;
					if (this.size[0] != k || this.size[1] != b) {
						j.style.width = (this.size[0] = k) + "px";
						j.style.height = (this.size[1] = b) + "px"
					}
					if (this.styleBox && this.table
							|| (this.table = this.getElement("table"))) {
						var g, f, d;
						g = g
								|| parseInt(baidu.dom(this.table.rows[0])
										.getCurrentStyle("height"));
						d = d
								|| parseInt(baidu.dom(this.table.rows[2])
										.getCurrentStyle("height"));
						this.table.rows[0].style.height = g + "px";
						this.table.rows[2].style.height = d + "px";
						this.table.rows[1].style.height = (this.layer.offsetHeight
								- g - d)
								+ "px"
					}
				}
			}
		}
	});
(function() {
		magic.Popup = function(b) {
			var d = this;
			magic.control.Popup.call(d, b);
			d.content = "";
			d.className = "";
			d.styleBox = false;
			baidu.object.extend(this, b || {});
			var c = a.produce();
			d.$mappingDom("", c.getElement());
			d.$mappingDom("content", c.getElement("content"));
			c.getElement().style.zIndex = baidu.global.getZIndex("popup");
			d.setContent(d.content);
			d.className && baidu.dom(c.getElement()).addClass(d.className);
			d.on("dispose", function() {
						d.className
								&& baidu.dom(c.getElement())
										.removeClass(d.className);
						d.setContent("");
						c.busy = false
					})
		};
		baidu.lang.inherits(magic.Popup, magic.control.Popup, "magic.Popup");
		var a = {
			list : [],
			produce : function() {
				for (var b = 0, d = this.list.length; b < d; b++) {
					if (!this.list[b].busy) {
						this.list[b].busy = true;
						return this.list[b]
					}
				}
				var c = new magic.Base();
				baidu.dom(document.body).insertHTML(
						"afterbegin",
						["<div class='tang-popup' id='", c.$getId(), "' ",
								"style='position:absolute; display:none;'>",
								(c.background = new magic.Background({
											coverable : false
										})).toHTMLString(),
								"<div class='tang-foreground' id='",
								c.$getId("content"), "'></div>", "</div>"]
								.join(""));
				c.busy = true;
				this.list.push(c);
				return c
			}
		}
	})();
	magic.control.Suggestion = baidu.lang.createClass(function(a) {
		var b = this;
		baidu.object.extend(this, a || {});
		b.dataCache = {};
		b.enableIndexs = [];
		b.selectedIndex = -1;
		b.currentQuery = "";
		b.oldInputValue = "";
		b.upDownArrowTimer = null;
		b.on("onload", function() {
					var f = b.getElement("input"), g = null;
					b.oldInputValue = b.getElement("input").value;
					function d() {
						g = setInterval(function() {
									var h = f.value;
									if (!h && b.isShowing()) {
										b._hide()
									} else {
										if (h != b.oldInputValue) {
											h && b.fire("onneeddata", h);
											b.oldInputValue = h
										}
									}
								}, 100)
					}
					d();
					var c = (function() {
						return b._keydownHandler()
					})();
					var e = function(h) {
						if (g) {
							clearInterval(g);
							d()
						}
						if (b.upDownArrowTimer) {
							clearTimeout(b.upDownArrowTimer);
							b.upDownArrowTimer = null
						}
					};
					baidu.dom(f).on("keydown", c);
					baidu.dom(f).on("keyup", e);
					b.on("onmousedownitem", function() {
								clearInterval(g);
								setTimeout(function() {
											d()
										}, 500)
							});
					b.on("ondispose", function() {
								baidu.dom(f).off("keydown", c);
								baidu.dom(f).off("keyup", e);
								clearInterval(g)
							})
				});
		b.on("onrender", function() {
			var e = b.getElement("input"), d = b.getElement("suggestion"), c = function() {
				b.hide()
			}, f = function(h) {
				var h = h || window.event, g = h.target || h.srcElement;
				if (!b.suggestion) {
					return
				}
				if (g == d || baidu.dom.contains(d, g)
						|| g == b.getElement("input")) {
					return
				}
				b.hide()
			};
			baidu.dom(window).on("blur", c);
			baidu.dom(document).on("click", f);
			b.on("ondispose", function() {
						baidu.dom(window).off("blur", c);
						baidu.dom(document).off("click", f)
					})
		});
		b.on("onneeddata", function(d, e) {
					var c = b.dataCache;
					b.currentQuery = e;
					if (typeof c[e] == "undefined") {
						b.getData(e)
					} else {
						b.currentData = c[e];
						(b.currentData.length > 0) ? b.show() : b.hide()
					}
				});
		b.on("beforeshow", function() {
					var e = b.currentData, d = 0, c = e.length;
					b.enableIndexs = [];
					for (; d < c; d++) {
						if (typeof e[d]["disable"] == "undefined"
								|| e[d]["disable"] == false) {
							b.enableIndexs.push(d)
						}
					}
				})
	}, {
		type : "magic.control.Suggestion",
		superClass : magic.Base
	}).extend({
		tpl : {
			fix : "<div id='#{0}' class='#{1}'>#{2}</div>",
			body : '<table cellspacing="0" cellpadding="2" class="tang-suggestion-table"><tbody>#{0}</tbody></table>',
			item : '<tr><td id="#{0}" onmouseover="#{2}" onmouseout="#{3}" onmousedown="#{4}" onclick="#{5}" class="#{6}">#{1}</td></tr>'
		},
		render : function() {
			var b = this, a = new magic.Popup({
						autoHide : false,
						autoTurn : false,
						disposeOnHide : false
					});
			popupContainer = a.getElement();
			baidu.dom(popupContainer).addClass("tang-suggestion-popup");
			b.$mappingDom("suggestion", popupContainer);
			b.suggestion = a;
			baidu.dom(b.getElement("input")).attr("autocomplete", "off");
			b.fire("onrender");
			return popupContainer
		},
		isShowing : function() {
			var b = this, a = b.getElement("suggestion");
			return a && baidu.dom(a).css("display") != "none"
		},
		show : function() {
			var b = this, c = b.getElement("suggestion") || b.render(), d = b
					.getElement("input"), a = (b.offset && b.offset.width)
					|| d.offsetWidth;
			b.fire("beforeshow");
			b.suggestion.setContent(b._getSuggestionString());
			b.suggestion.attach(d, {
						offsetX : (b.offset && b.offset.offsetX) || 0,
						offsetY : (b.offset && b.offset.offsetY) || -1
					});
			baidu.dom(c).css("width", parseInt(a) + "px");
			baidu.dom(c).css("display", "block");
			b.selectedIndex = -1;
			b.fire("onshow")
		},
		hide : function() {
			var d = this, a = d.getElement("suggestion");
			if (!a || !d.isShowing()) {
				return
			}
			if (d.selectedIndex >= 0 && d.holdHighLight) {
				var c = d.currentData, b = d.enableIndexs[d.selectedIndex];
				if (c[b]
						&& (typeof c[b].disable == "undefined" || c[b].disable == false)) {
					d.$pick(b)
				}
			} else {
				d.oldInputValue = d.getElement("input").value
			}
			d._hide()
		},
		_hide : function() {
			var b = this, a = b.getElement("suggestion");
			baidu.dom(a).css("display", "none");
			b.selectedIndex = -1;
			b.fire("onhide")
		},
		_getSuggestionString : function() {
			var g = this, d = "", a = [], b = g.currentData, f = b.length, c = 0, e;
			function j(k) {
				return baidu.string.format(g.tpl.fix, g.$getId(k), g
								._getClass(k), g[k + "HTML"])
			}
			g.prependHTML && (d += j("prepend"));
			var h = magic._baiduInstName;
			for (; c < f; c++) {
				e = h + "('" + g.guid + "')";
				a
						.push(baidu.string
								.format(
										g.tpl.item,
										g.$getId("item" + c),
										b[c].content,
										e + "._mouseOver(event, " + c + ")",
										e + "._mouseOut(event, " + c + ")",
										e + "._mouseDown(event, " + c + ")",
										e + "._mouseClick(event, " + c + ")",
										(typeof b[c]["disable"] == "undefined" || b[c]["disable"] == false)
												? ""
												: "tang-suggestion-disable"))
			}
			d += baidu.string.format(g.tpl.body, a.join(""));
			g.appendHTML && (d += j("append"));
			return d
		},
		getInputValue : function() {
			return this.getElement("input").value
		},
		getDataByIndex : function(a) {
			return this.currentData[a]
		},
		_isEnable : function(a) {
			var b = this;
			return baidu.array(b.enableIndexs).contains(a)
		},
		_getItemDom : function(a) {
			return baidu.dom("#" + this.$getId("item" + a)).get(0)
		},
		_getClass : function(a) {
			return "tang-suggestion-" + a
		},
		_focus : function(a) {
			var b = this.enableIndexs;
			this.$pick(b[a]);
			this.$highlight(b[a])
		},
		$highlight : function(b) {
			var d = this, a = d.enableIndexs, c = null;
			if (!d._isEnable(b)) {
				return
			}
			d.selectedIndex >= 0 && d.$clearHighlight();
			c = d._getItemDom(b);
			baidu.dom(c).addClass("tang-suggestion-current");
			d.selectedIndex = baidu.array(a).indexOf(b);
			d.fire("onhighlight", {
						index : b,
						value : d.getDataByIndex(b).value
					})
		},
		$clearHighlight : function() {
			var c = this, a = c.selectedIndex, b = null;
			index = 0;
			index = c.enableIndexs[a];
			if (a >= 0) {
				b = c._getItemDom(index);
				baidu.dom(b).removeClass(c._getClass("current"));
				c.selectedIndex = -1;
				c.fire("onclearhighlight", {
							index : index,
							value : c.getDataByIndex(index).value
						})
			}
		},
		$pick : function(a) {
			var d = this, c = d.currentData, b = c[a];
			if (d.fire("onbeforepick", {
						index : a,
						value : b.value
					})) {
				d.getElement("input").value = b.value;
				d.oldInputValue = b.value;
				d.fire("onpick", {
							index : a,
							value : b.value
						})
			}
		},
		$confirm : function(a) {
			var b = this;
			if (!b._isEnable(a)) {
				return
			}
			b.$pick(a);
			b.fire("onconfirm", {
						index : a,
						value : b.getDataByIndex(a).value
					});
			b._hide()
		},
		_wrapData : function(b) {
			var a = this;
			_data = [], i = 0, len = b.length;
			for (; i < len; i++) {
				if (typeof b[i].value != "undefined") {
					_data.push(b[i])
				} else {
					_data.push({
								value : b[i],
								content : baidu.string.encodeHTML(b[i])
							})
				}
			}
			return _data
		},
		getData : function(a) {
		},
		receiveData : function(d, c) {
			var b = this, a = b.$cacheData(d, c);
			b.selectedIndex = -1;
			if (d == b.getInputValue()) {
				b.currentData = a;
				(c.length > 0) ? b.show() : b.hide()
			}
		},
		$cacheData : function(d, c) {
			var b = this, a = b._wrapData(c);
			b.dataCache[d] = a;
			return a
		},
		_mouseOver : function(c, a) {
			var b = this;
			c = baidu.event(c);
			c.stopPropagation();
			if (b._isEnable(a)) {
				b.$highlight(a);
				b.selectedIndex = baidu.array(b.enableIndexs).indexOf(a)
			}
			b.fire("onmouseoveritem", {
						index : a,
						value : b.getDataByIndex(a).value
					})
		},
		_mouseOut : function(c, a) {
			var b = this;
			c = baidu.event(c);
			c.stopPropagation();
			if (!b.holdHighLight) {
				b._isEnable(a) && b.$clearHighlight()
			}
			b.fire("onmouseoutitem", {
						index : a,
						value : b.getDataByIndex(a).value
					})
		},
		_mouseDown : function(c, a) {
			var b = this;
			c = baidu.event(c);
			c.stopPropagation();
			b.fire("onmousedownitem", {
						index : a,
						value : b.getDataByIndex(a).value
					})
		},
		_mouseClick : function(c, a) {
			var b = this;
			c = baidu.event(c);
			c.stopPropagation();
			b.fire("onmouseclick", {
						index : a,
						value : b.getDataByIndex(a).value
					});
			b.$confirm(a)
		},
		_keydownHandler : function() {
			var b = this;
			function a(f) {
				var e = b.getInputValue(), d = b.enableIndexs, c = b.selectedIndex;
				if (!e) {
					return
				}
				if ((e && !b.isShowing())) {
					b.fire("onneeddata", e);
					return
				}
				if (d.length == 0) {
					return
				}
				if (b.upDownArrowTimer) {
					return
				}
				b.upDownArrowTimer = setTimeout(function() {
							clearTimeout(b.upDownArrowTimer);
							b.upDownArrowTimer = null
						}, 200);
				if ("up" == f) {
					switch (c) {
						case -1 :
							b.$clearHighlight();
							c = d.length - 1;
							b._focus(c);
							break;
						case 0 :
							c = -1;
							b.$clearHighlight();
							b.getElement("input").value = b.currentQuery;
							b.oldInputValue = b.currentQuery;
							break;
						default :
							c--;
							b._focus(c);
							break
					}
				} else {
					switch (c) {
						case -1 :
							c = 0;
							b._focus(c);
							break;
						case d.length - 1 :
							c = -1;
							b.$clearHighlight();
							b.getElement("input").value = b.currentQuery;
							b.oldInputValue = b.currentQuery;
							break;
						default :
							c++;
							b._focus(c);
							break
					}
				}
				b.selectedIndex = c
			}
			return function(d) {
				var c = "up";
				switch (d.keyCode) {
					case 27 :
					case 9 :
						b.hide();
						break;
					case 13 :
						d.preventDefault();
						d.stopPropagation();
						if (b.selectedIndex >= 0 && b.holdHighLight) {
							b.$confirm(b.enableIndexs[b.selectedIndex])
						} else {
							b.fire("onconfirm", {
										data : b.getInputValue()
									});
							if (b.isShowing()) {
								b._hide()
							}
						}
						break;
					case 40 :
						c = "down";
					case 38 :
						d.preventDefault();
						d.stopPropagation();
						a(c);
						break;
					default :
						break
				}
			}
		},
		$dispose : function() {
			var a = this;
			if (a.disposed) {
				return
			}
			if (a.suggestion) {
				a.suggestion.$dispose();
				a.hide()
			}
			magic.Base.prototype.$dispose.call(a)
		}
	});
	magic.setup.suggestion = function(c, b) {
		var c = baidu.dom("#" + c).get(0), a = magic.setup(c,
				magic.control.Suggestion, b);
		a.$mappingDom("input", c);
		a.fire("onload");
		return a
	};
	var passport = passport || window.passport || {};
	passport.err = passport.err || {};
(function(a) {
		var b = {
			login : {
				"-1" : {
					msg : "\u7cfb\u7edf\u9519\u8bef\uff0c\u8bf7\u60a8\u7a0d\u540e\u518d\u8bd5",
					field : ""
				},
				"1" : {
					msg : "\u7528\u6237\u540d\u8fc7\u957f\uff0c\u8bf7\u91cd\u65b0\u8f93\u5165",
					field : "userName"
				},
				"2" : {
					msg : "\u6b64\u5E10\u53f7\u4e0d\u5b58\u5728",
					field : "userName"
				},
				"4" : {
					msg : "\u60a8\u8f93\u5165\u7684\u8d26\u53f7\u6216\u5bc6\u7801\u6709\u8bef",
					field : "password"
				},
				"5" : {
					msg : "\u60a8\u767b\u5f55\u8fc7\u4e8e\u9891\u7e41\uff0c\u8bf724\u5c0f\u65f6\u540e\u518d\u8bd5",
					field : ""
				},
				"6" : {
					msg : "\u9a8c\u8bc1\u7801\u4e0d\u5339\u914d\uff0c\u8bf7\u91cd\u65b0\u8f93\u5165\u9a8c\u8bc1\u7801",
					field : "verifyCode"
				},
				"16" : {
					msg : "\u5bf9\u4e0d\u8d77\uff0c\u60a8\u73b0\u5728\u65e0\u6cd5\u767b\u5f55",
					field : ""
				},
				"257" : {
					msg : "\u8bf7\u8f93\u5165\u9a8c\u8bc1\u7801",
					field : "verifyCode"
				},
				"120016" : {
					msg : "",
					field : ""
				},
				"100005" : {
					msg : "\u7cfb\u7edf\u9519\u8bef\uff0c\u8bf7\u60a8\u7a0d\u540e\u518d\u8bd5",
					field : ""
				},
				"120019" : {
					msg : "\u5e10\u53f7\u51bb\u7ed3<a href='#{gotourl}' target='_blank'>\u8bf7\u89e3\u51bb</a>\u621624\u5c0f\u65f6\u540e\u518d\u8bd5",
					field : "userName"
				},
				"110024" : {
					msg : "\u6b64\u8d26\u53f7\u6682\u672a\u6fc0\u6d3b\uff0c<a href='#{gotourl}'>\u91cd\u53d1\u9a8c\u8bc1\u90ae\u4ef6</a>",
					field : ""
				}
			},
			reg : {
				"-1" : {
					msg : "\u6ce8\u518c\u65f6\u53d1\u751f\u672a\u77e5\u9519\u8bef",
					field : "isAgree"
				},
				"110002" : {
					msg : "\u7528\u6237\u540d\u683c\u5f0f\u6709\u8bef\uff08\u4ec5\u80fd\u4f7f\u7528\u6c49\u5b57\u3001\u534a\u89d2\u6570\u5b57\u3001\u534a\u89d2\u5b57\u6bcd\u6216\u4e0b\u5212\u7ebf\uff0c\u4e14\u4e0d\u80fd\u662f\u7eaf\u6570\u5b57\uff09",
					field : "userName"
				},
				"130006" : {
					msg : "\u6b64\u7528\u6237\u540d\u4e0d\u53ef\u4f7f\u7528",
					field : "userName"
				},
				"130007" : {
					msg : "\u6b64\u7528\u6237\u540d\u4e0d\u53ef\u4f7f\u7528",
					field : "userName"
				},
				"110023" : {
					msg : "\u8be5\u90ae\u7bb1\u5df2\u88ab\u6fc0\u6d3b\uff0c\u8bf7\u76f4\u63a5<a href='https://passport.baidu.com/v2/?login' target='_blank'>\u767b\u5f55</a>",
					field : "email"
				},
				"110024" : {
					msg : "\u8be5\u90ae\u7bb1\u5df2\u88ab\u6ce8\u518c\uff0c\u4f46\u672a\u6fc0\u6d3b\uff0c\u8bf7\u5230\u9a8c\u8bc1\u90ae\u4ef6\u4e2d\u6fc0\u6d3b\u6216\u8005<a href='https://passport.baidu.com/v2/?regnotify&needresend=true&tpl=pp&user=#{email}' target='_blank'>\u91cd\u53d1\u9a8c\u8bc1\u90ae\u4ef6</a>",
					field : "email"
				},
				"130036" : {
					msg : "\u4e3a\u4e86\u786e\u4fdd\u60a8\u80fd\u53ca\u65f6\u6536\u5230\u90ae\u4ef6\uff0c\u8bf7\u4f7f\u7528<a href='http://www.baidu.com/search/passport_help.html#09' target='_blank'>\u4e3b\u6d41\u90ae\u7bb1</a>",
					field : "email"
				},
				"10" : {
					msg : "\u8bf7\u586b\u5199\u7528\u6237\u540d",
					field : "userName"
				},
				"11" : {
					msg : "\u4ec5\u652f\u6301\u4e2d\u82f1\u6587\u3001\u6570\u5b57\u548c\u4e0b\u5212\u7ebf\uff0c\u4e14\u4e0d\u80fd\u4e3a\u7eaf\u6570\u5b57",
					field : "userName"
				},
				"12" : {
					msg : "\u7528\u6237\u540d\u4ec5\u53ef\u4f7f\u7528\u6c49\u5b57\u3001\u6570\u5b57\u3001\u5b57\u6bcd\u548c\u4e0b\u5212\u7ebf",
					field : "userName"
				},
				"14" : {
					msg : "\u6b64\u7528\u6237\u540d\u5df2\u88ab\u6ce8\u518c",
					field : "userName"
				},
				"15" : {
					msg : "\u60a8\u7684\u7528\u6237\u540d\u4e0d\u53ef\u7528",
					field : "userName"
				},
				"16" : {
					msg : "\u6ce8\u518c\u65f6\u53d1\u751f\u672a\u77e5\u9519\u8bef",
					field : "isAgree"
				},
				"20" : {
					msg : "\u8bf7\u586b\u5199\u5bc6\u7801",
					field : "password"
				},
				"21" : {
					msg : "\u5bc6\u7801\u5fc5\u987b\u75316-14\u4e2a\u5b57\u7b26\u7ec4\u6210",
					field : "password"
				},
				"22" : {
					msg : "\u5bc6\u7801\u4e0e\u786e\u8ba4\u5bc6\u7801\u4e0d\u4e00\u81f4",
					field : "verifyPass"
				},
				"23" : {
					msg : "\u5bc6\u7801\u4ec5\u80fd\u7531\u6570\u5b57\uff0c\u5b57\u6bcd\u548c\u7b26\u53f7\u7ec4\u6210 / \u5bc6\u7801\u4e2d\u4e0d\u80fd\u542b\u6709\u7a7a\u683c",
					field : "password"
				},
				"24" : {
					msg : "\u60a8\u7684\u5bc6\u7801\u592a\u8fc7\u7b80\u5355\uff0c\u8bf7\u4f7f\u7528\u5b57\u6bcd\u548c\u6570\u5b57\u7684\u7ec4\u5408\uff0c\u5426\u5219\u65e0\u6cd5\u6ce8\u518c\u6210\u529f",
					field : "password"
				},
				"30" : {
					msg : "\u8bf7\u60a8\u8f93\u5165\u65b0\u7684\u90ae\u7bb1",
					field : "email"
				},
				"31" : {
					msg : "\u60a8\u8f93\u5165\u7684\u90ae\u7bb1\u683c\u5f0f\u6709\u8bef",
					field : "email"
				},
				"40" : {
					msg : "\u8bf7\u8f93\u5165\u9a8c\u8bc1\u7801",
					field : "verifyCode"
				},
				"41" : {
					msg : "\u9a8c\u8bc1\u7801\u683c\u5f0f\u9519\u8bef",
					field : "verifyCode"
				},
				"42" : {
					msg : "\u60a8\u8f93\u5165\u7684\u9a8c\u8bc1\u7801\u6709\u8bef",
					field : "verifyCode"
				}
			},
			fillUserName : {
				"-1" : {
					msg : "\u7cfb\u7edf\u9519\u8bef\uff0c\u4f11\u606f\u4e00\u4f1a\u513f\uff0c\u8bf7\u60a8\u7a0d\u540e\u518d\u8bd5",
					field : ""
				},
				"11" : {
					msg : "\u7528\u6237\u540d\u6700\u957f\u4e0d\u5f97\u8d85\u8fc77\u4e2a\u6c49\u5b57\uff0c\u621614\u4e2a\u5b57\u8282\uff08\u534a\u89d2\u6570\u5b57\u3001\u534a\u89d2\u5b57\u6bcd\u6216\u4e0b\u5212\u7ebf\uff09",
					field : "userName"
				},
				"160100" : {
					msg : "\u8bf7\u586b\u5199\u7528\u6237\u540d",
					field : "userName"
				},
				"160102" : {
					msg : "\u8bf7\u767b\u5f55\u540e\u518d\u8865\u586b",
					field : "userName"
				},
				"160103" : {
					msg : "\u8bf7\u767b\u5f55\u540e\u518d\u8865\u586b",
					field : ""
				},
				"160111" : {
					msg : "\u6b64\u7528\u6237\u540d\u5df2\u88ab\u6ce8\u518c\uff0c\u8bf7\u53e6\u6362\u4e00\u4e2a",
					field : "userName"
				},
				"160104" : {
					msg : "\u60a8\u5df2\u5b8c\u6210\u7528\u6237\u540d\u8865\u586b",
					field : ""
				},
				"160105" : {
					msg : "\u6b64\u7528\u6237\u540d\u4e0d\u53ef\u4f7f\u7528",
					field : "userName"
				},
				"160110" : {
					msg : "\u7528\u6237\u540d\u4ec5\u53ef\u4f7f\u7528\u6c49\u5b57\u3001\u6570\u5b57\u3001\u5b57\u6bcd\u548c\u4e0b\u5212\u7ebf",
					field : "userName"
				}
			},
			regPhone : {
				"-1" : {
					msg : "\u53d1\u751f\u672a\u77e5\u9519\u8bef",
					field : "isAgree"
				},
				"130018" : {
					msg : "\u8bf7\u60a8\u8f93\u5165\u624b\u673a\u53f7",
					field : "phone"
				},
				"130019" : {
					msg : "\u60a8\u8f93\u5165\u7684\u624b\u673a\u53f7\u683c\u5f0f\u6709\u8bef",
					field : "phone"
				},
				"130020" : {
					msg : "\u8be5\u624b\u673a\u53f7\u5df2\u88ab\u6ce8\u518c\uff0c\u8bf7\u66f4\u6362\u624b\u673a\u53f7\u6ce8\u518c\u6216\u8005<a href='http://passport.baidu.com/v2/?login' target='_blank'>\u76f4\u63a5\u767b\u5f55</a>",
					field : "phone"
				},
				"130035" : {
					msg : "\u60a8\u7684\u624b\u673a\u53f7\u5df2\u88ab\u6ce8\u518c\uff0c\u8bf7\u76f4\u63a5\u767b\u5f55\u6216\u66f4\u6362\u624b\u673a\u53f7\u6ce8\u518c",
					field : "phone"
				},
				"130017" : {
					msg : "\u53d1\u9001\u77ed\u4fe1\u8fc7\u591a\uff0c\u8bf724\u5c0f\u65f6\u540e\u518d\u8bd5",
					field : "verifyCodeSend"
				},
				"130038" : {
					msg : "\u53d1\u9001\u77ed\u4fe1\u8fc7\u4e8e\u9891\u7e41\uff0c\u8bf7\u60a8\u7a0d\u540e\u518d\u8bd5",
					field : "verifyCodeSend"
				},
				"130010" : {
					msg : "\u8bf7\u60a8\u8f93\u5165\u5bc6\u7801",
					field : "password"
				},
				"130011" : {
					msg : "\u5bc6\u7801\u5fc5\u987b\u75316-14\u4e2a\u5b57\u7b26\u7ec4\u6210",
					field : "password"
				},
				"110013" : {
					msg : "\u5bc6\u7801\u4ec5\u652f\u6301\u6570\u5b57\uff0c\u5b57\u6bcd\u548c\u7b26\u53f7\uff0c\u4e14\u5bc6\u7801\u4e2d\u4e0d\u80fd\u542b\u6709\u7a7a\u683c",
					field : "password"
				},
				"110012" : {
					msg : "\u5bc6\u7801\u8fc7\u4e8e\u7b80\u5355\uff0c\u5efa\u8bae\u4f7f\u7528\u6570\u5b57\u52a0\u5b57\u6bcd\u7ec4\u5408\uff0c\u5426\u5219\u65e0\u6cd5\u6ce8\u518c\u6210\u529f",
					field : "password"
				},
				"130023" : {
					msg : "\u8bf7\u8f93\u5165\u77ed\u4fe1\u6fc0\u6d3b\u7801",
					field : "smsCode"
				},
				"130021" : {
					msg : "\u8bf7\u60a8\u8f93\u5165\u77ed\u4fe1\u6fc0\u6d3b\u7801",
					field : "smsCode"
				},
				"130022" : {
					msg : "\u77ed\u4fe1\u6fc0\u6d3b\u7801\u9519\u8bef",
					field : "smsCode"
				},
				"130003" : {
					msg : "\u60a8\u8f93\u5165\u7684\u77ed\u4fe1\u6fc0\u6d3b\u7801\u6709\u8bef",
					field : "smsCode"
				},
				"130036" : {
					msg : "\u6fc0\u6d3b\u7801\u9519\u8bef\u6b21\u6570\u8fc7\u591a\uff0c\u8bf724\u5c0f\u65f6\u540e\u91cd\u65b0\u6ce8\u518c",
					field : "smsCode"
				},
				"130037" : {
					msg : "\u6fc0\u6d3b\u7801\u9519\u8bef\u6b21\u6570\u8fc7\u591a\uff0c\u8bf724\u5c0f\u65f6\u540e\u91cd\u65b0\u6ce8\u518c",
					field : "smsCode"
				},
				"130004" : {
					msg : "\u6fc0\u6d3b\u7801\u5df2\u5931\u6548\uff0c\u8bf7\u60a8\u91cd\u65b0\u767b\u5f55",
					field : "smsCode"
				},
				"130032" : {
					msg : "\u60a8\u8fd8\u672a\u63a5\u53d7\u767e\u5ea6\u7528\u6237\u534f\u8bae\uff0c\u8bf7\u52fe\u9009",
					field : "isAgree"
				},
				"130039" : {
					msg : "\u7cfb\u7edf\u7e41\u5fd9\uff0c\u8bf7\u7a0d\u540e\u518d\u8bd5",
					field : "isAgree"
				}
			}
		};
		a.getCurrent = function() {
			return b
		}
	})(passport.err);
	var passport = passport || window.passport || {};
	passport.data = passport.data || {};
(function(x) {
		var d = function() {
		};
		function e(p) {
			this._requests = [];
			this._value = null;
			this._exception = null;
			this._isComplete = false;
			var z = this;
			p(function(A) {
						z._fulfillPromise(A)
					}, function(A) {
						z._breakPromise(A)
					})
		}
		e.prototype = {
			get_isComplete : function() {
				return this._isComplete
			},
			get_value : function() {
				if (!this._isComplete) {
					return undefined
				}
				if (this._exception) {
					throw this._exception
				}
				return this._value
			},
			call : function(A, C) {
				var z = [];
				for (var B = 0, p = arguments.length - 1; B < p; B++) {
					z[B] = arguments[B + 1]
				}
				return this.when(function(D) {
							return D[A].apply(D, z)
						})
			},
			getValue : function(p) {
				return this.when(function(z) {
							return z[p]
						})
			},
			setValue : function(p, z) {
				this.whenOnly(function(A) {
							A[p] = z
						})
			},
			when : function(z, A, p) {
				return e.when(this, z, A, p)
			},
			whenOnly : function(z, A, p) {
				e.whenOnly(this, z, A, p)
			},
			success : function(z, p) {
				return this.when(z, d, p)
			},
			fail : function(z, p) {
				return this.when(d, z, p)
			},
			_enqueueOne : function(p) {
				if (this._isComplete) {
					this._notify(p)
				} else {
					this._requests.push(p)
				}
			},
			_notify : function(p) {
				if (this._exception) {
					if (p.breakPromise) {
						p.breakPromise(this._exception)
					}
				} else {
					if (p.fulfillPromise) {
						p.fulfillPromise(this._value)
					}
				}
			},
			_notifyAll : function() {
				for (var z = 0, p = this._requests.length; z < p; z++) {
					this._notify(this._requests[z])
				}
			},
			_fulfillPromise : function(p) {
				this._value = p;
				this._exception = null;
				this._isComplete = true;
				this._notifyAll()
			},
			_breakPromise : function(p) {
				this._value = null;
				this._exception = p || new Error("An error occured");
				this._isComplete = true;
				this._notifyAll()
			}
		};
		e.when = function(B, z, A, p) {
			return new e(function(C, D) {
						e.make(B)._enqueueOne({
									fulfillPromise : function(E) {
										if (z) {
											C(z.call(p, E))
										} else {
											C(E)
										}
									},
									breakPromise : function(E) {
										if (A) {
											try {
												C(A.call(p, E))
											} catch (F) {
												D(F)
											}
										} else {
											D(E)
										}
									}
								})
					})
		};
		e.whenOnly = function(B, z, A, p) {
			e.make(B)._enqueueOne({
						fulfillPromise : function(C) {
							if (z) {
								z.call(p, C)
							}
						},
						breakPromise : function(C) {
							if (A) {
								A.call(p, C)
							}
						}
					})
		};
		e.make = function(p) {
			if (p instanceof e) {
				return p
			}
			return e.immediate(p)
		};
		e.immediate = function(p) {
			return new e(function(z, A) {
						z(p)
					})
		};
		var h = {};
(function(p) {
			var z = new RegExp(
					"(^[\\s\\t\\xa0\\u3000]+)|([\\u3000\\xa0\\s\\t]+\x24)", "g");
			p.trim = function(A) {
				return String(A).replace(z, "")
			};
			p.getUniqueId = function(A) {
				return A + Math.floor(Math.random() * 2147483648).toString(36)
			};
			p.g = function(A) {
				if (!A) {
					return null
				}
				if ("string" == typeof A || A instanceof String) {
					return document.getElementById(A)
				} else {
					if (A.nodeName && (A.nodeType == 1 || A.nodeType == 9)) {
						return A
					}
				}
				return null
			};
			p.getParent = function(A) {
				A = p.g(A);
				return A.parentElement || A.parentNode || null
			};
			p.encodeHTML = function(A) {
				return String(A).replace(/&/g, "&amp;").replace(/</g, "&lt;")
						.replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(
								/'/g, "&#39;")
			};
			p.array = p.array || {};
			p.array.indexOf = function(E, B, D) {
				var A = E.length, C = B;
				D = D | 0;
				if (D < 0) {
					D = Math.max(0, A + D)
				}
				for (; D < A; D++) {
					if (D in E && E[D] === B) {
						return D
					}
				}
				return -1
			};
			p.array.contains = function(A, B) {
				return (baidu.array.indexOf(A, B) >= 0)
			};
			p.browser = p.browser || {};
			p.browser.opera = /opera(\/| )(\d+(\.\d+)?)(.+?(version\/(\d+(\.\d+)?)))?/i
					.test(navigator.userAgent)
					? +(RegExp["\x246"] || RegExp["\x242"])
					: undefined;
			p.insertHTML = function(D, A, C) {
				D = p.g(D);
				var B, E;
				if (D.insertAdjacentHTML && !p.browser.opera) {
					D.insertAdjacentHTML(A, C)
				} else {
					B = D.ownerDocument.createRange();
					A = A.toUpperCase();
					if (A == "AFTERBEGIN" || A == "BEFOREEND") {
						B.selectNodeContents(D);
						B.collapse(A == "AFTERBEGIN")
					} else {
						E = A == "BEFOREBEGIN";
						B[E ? "setStartBefore" : "setEndAfter"](D);
						B.collapse(E)
					}
					B.insertNode(B.createContextualFragment(C))
				}
				return D
			};
			p.format = function(C, A) {
				C = String(C);
				var B = Array.prototype.slice.call(arguments, 1), D = Object.prototype.toString;
				if (B.length) {
					B = B.length == 1 ? (A !== null
							&& (/\[object Array\]|\[object Object\]/.test(D
									.call(A))) ? A : B) : B;
					return C.replace(/#\{(.+?)\}/g, function(E, G) {
								var F = B[G];
								if ("[object Function]" == D.call(F)) {
									F = F(G)
								}
								return ("undefined" == typeof F ? "" : F)
							})
				}
				return C
			}
		})(h);
		x.base = h;
		var o = {};
(function(p) {
			var z = "__bdpp_pstc__" + new Date().getTime(), H = z + "_form", A = z
					+ "_ifr";
			var J = function(N) {
				if (typeof(N) == "object") {
					var K = [];
					for (var O in N) {
						var M = N[O];
						if (M !== undefined && M !== null) {
							if (K.length) {
								K.push("&")
							}
							var L = encodeURIComponent(typeof(M) == "boolean"
									? (M ? "1" : "0")
									: M.toString());
							K.push(encodeURIComponent(O), "=", L)
						}
					}
					return K.join("")
				}
				if (typeof(N) == "string") {
					return N
				}
				return null
			};
			var F = function(K, M) {
				M = J(M);
				if (typeof(M) == "string") {
					var L = (/\?/g).test(K);
					K += (L ? "&" : "?") + J(M)
				}
				return K
			};
			var I = function(L, K, M) {
				L.setAttribute("type", "text/javascript");
				M && L.setAttribute("charset", M);
				L.setAttribute("src", K);
				document.getElementsByTagName("head")[0].appendChild(L)
			};
			var B = function(L) {
				if (L.clearAttributes) {
					L.clearAttributes()
				} else {
					for (var K in L) {
						if (L.hasOwnProperty(K)) {
							delete L[K]
						}
					}
				}
				if (L && L.parentNode) {
					L.parentNode.removeChild(L)
				}
				L = null
			};
			var D = function(K, W, X) {
				var S = document.createElement("SCRIPT"), R = "bd__cbs__", U, O, Y = X
						|| {}, N = Y.charset, P = Y.queryField || "callback", V = Y.timeOut
						|| 0, L, M = new RegExp("(\\?|&)" + P + "=([^&]*)"), Q;
				U = h.getUniqueId(R);
				window[U] = T(0);
				if (V) {
					L = setTimeout(T(1), V)
				}
				K = K.replace(M, "\x241" + P + "=" + U);
				if (K.search(M) < 0) {
					K += (K.indexOf("?") < 0 ? "?" : "&") + P + "=" + U
				}
				I(S, K, N);
				function T(Z) {
					return function() {
						try {
							if (Z) {
								Y.onfailure && Y.onfailure()
							} else {
								W.apply(window, arguments);
								clearTimeout(L)
							}
							window[U] = null;
							delete window[U]
						} catch (aa) {
						} finally {
							B(S)
						}
					}
				}
			};
			var G = function(N, M) {
				var K = [];
				K.push("<form id='", H, "' target='", A, "' ");
				K.push("action='", h.encodeHTML(N), "' method='post'>");
				for (var P in M) {
					if (M.hasOwnProperty(P)) {
						var O = M[P];
						if (O !== undefined && O !== null) {
							var L = h.encodeHTML(typeof(O) == "boolean" ? (O
									? "1"
									: "0") : O);
							K.push("<input type='hidden' name='", h
											.encodeHTML(P), "' value='", L,
									"' />")
						}
					}
				}
				K.push("</form>");
				return K.join("")
			};
			var E = function(K, O, S, T) {
				T = T || {};
				var R = T.timeOut || 0, L = false, Q = h
						.getUniqueId("bd__pcbs__");
				O[T.queryField || "callback"] = "parent." + Q;
				var M = G(K, O);
				if (h.g(H)) {
					h.getParent(H).innerHTML = M
				} else {
					var N = [];
					N.push("<div id='", z, "' style='display:none;'>");
					N.push("<div>", M, "</div>");
					N
							.push(
									"<iframe name='",
									A,
									"' src='"
											+ (window.location.protocol
													.toLowerCase() == "https:"
													? "https://passport.baidu.com/passApi/html/_blank.html"
													: "about:blank")
											+ "' style='display:none;'></iframe>");
					N.push("</div>");
					h.insertHTML(document.body, "beforeEnd", N.join(""))
				}
				window[Q] = P();
				if (R) {
					L = setTimeout(P(1), R)
				}
				function P(U) {
					return function() {
						try {
							if (U) {
								T.onfailure && T.onfailure()
							} else {
								S.apply(window, arguments);
								L && clearTimeout(L)
							}
							window[Q] = null;
							delete window[Q]
						} catch (V) {
						}
					}
				}
				h.g(H).submit()
			};
			p.jsonp = function(M, N, L) {
				L = L || {};
				var K = M;
				return new e(function(P, O) {
							M = F(M, N);
							D(M, function(Q) {
										if (L.processData) {
											Q = L.processData(Q)
										}
										P && P(Q)
									}, {
										charset : L.charset,
										queryField : L.queryField,
										timeOut : L.timeOut,
										onfailure : function() {
											O && O()
										}
									})
						})
			};
			p.submit = function(L, M, K) {
				if (L && M) {
					return new e(function(O, N) {
								E(L, M, function(P) {
											if (K.processData) {
												P = K.processData(P)
											}
											O && O(P)
										}, K)
							})
				}
			};
			var C = [];
			p.load = function(K) {
				return new e(function(O, N) {
							var M = C.push(new Image) - 1, L = false, P = setTimeout(
									function() {
										L = true;
										O && O()
									}, 1000);
							C[M].onload = function() {
								clearTimeout(P);
								if (!L) {
									O && O()
								}
								L = true;
								C[M] = C[M].onload = null
							};
							C[M].src = K
						})
			}
		})(o);
		var g = "https://passport.baidu.com", s = {
			getApiInfo : "/v2/api/?getapi",
			loginCheck : "/v2/api/?logincheck",
			getVerifyCodeStr : "/v2/?reggetcodestr",
			checkUserName : "/v2/?regnamesugg",
			checkPassword : "/v2/?regpwdcheck",
			checkMail : "/v2/?regmailcheck",
			isUserNoName : "/v2/api/?ucenteradduname",
			checkPhone : "/v2/?regphonecheck",
			sendPhoneCode : "/v2/?regphonesend"
		}, l = {
			login : "/v2/api/?login",
			reg : "/v2/api/?reg",
			fillUserName : "/v2/api/?ucenteradduname",
			regPhone : "/v2/api/?regphone"
		}, t = {
			getApiInfo : {
				apiType : "class"
			},
			login : {
				memberPass : "mem_pass",
				safeFlag : "safeflg",
				isPhone : "isPhone",
				timeSpan : "ppui_logintime"
			},
			fillUserName : {
				selectedSuggestName : "pass_fillinusername_suggestuserradio",
				timeSpan : "ppui_fillusernametime"
			},
			reg : {
				password : "loginpass",
				timeSpan : "ppui_regtime",
				suggestIndex : "suggestIndex",
				suggestType : "suggestType",
				selectedSuggestName : "pass_reg_suggestuserradio_0"
			},
			regPhone : {
				password : "loginpass",
				timeSpan : "ppui_regtime",
				suggestIndex : "suggestIndex",
				suggestType : "suggestType",
				selectedSuggestName : "pass_reg_suggestuserradio_0"
			}
		}, m = {
			loginCheck : {
				isPhone : function(z, p) {
					return z ? "true" : "false"
				}
			},
			login : {
				memberPass : function(z, p) {
					return (z ? "on" : "")
				}
			}
		}, y = {
			checkPassword : {
				fromreg : 1
			},
			reg : {
				registerType : 1,
				verifypass : function(p) {
					return p.password
				}
			}
		}, q = {
			password : true
		}, c = {
			login : function(p) {
				p.needToModifyPassword = (p.needToModifyPassword == 0
						? false
						: true)
			}
		}, b = {
			checkUserName : "reg",
			checkMail : "reg",
			checkPhone : "regPhone",
			sendPhoneCode : "regPhone"
		}, j = passport.err.getCurrent(), v = {};
		x.setContext = function(p) {
			v.product = p.product || v.product;
			v.charset = p.charset || v.charset;
			v.staticPage = p.staticPage || v.staticPage;
			v.token = p.token || v.token
		};
		function f(A, p, z) {
			if (p) {
				if (!z) {
					return function(B) {
						return o.jsonp(g + p, r(B, A, t[A], m[A], false), {
									charset : "utf-8",
									processData : function(C) {
										return n(A, C)
									}
								})
					}
				} else {
					return function(B) {
						B = B || {};
						return o.submit(g + p, r(B, A, t[A], m[A], true), {
									charset : "utf-8",
									processData : function(C) {
										if (C) {
											for (var E in C) {
												if (C.hasOwnProperty(E)) {
													var D = C[E];
													if (D) {
														C[E] = decodeURIComponent(D)
													}
												}
											}
										}
										return n(A, C)
									}
								})
					}
				}
			} else {
				return d
			}
		}
		function r(C, G, D, E, F) {
			var J = (F ? {
				staticpage : v.staticPage,
				charset : v.charset || document.characterSet
						|| document.charset || ""
			} : {}), A = y[G];
			if (A) {
				for (var z in A) {
					if (A.hasOwnProperty(z)) {
						var I = A[z];
						J[z] = (typeof(I) == "function" ? I(C) : I)
					}
				}
			}
			J.token = v.token;
			J.tpl = v.product;
			J.apiver = "v3";
			J.tt = new Date().getTime();
			if (C) {
				D = D || {};
				E = E || {};
				for (var z in C) {
					if (C.hasOwnProperty(z)) {
						var H = E[z], B = (!!H ? H(C[z], C) : C[z]);
						if (typeof(B) == "string") {
							if (F) {
								B = decodeURIComponent(B)
							}
							if (!q[z]) {
								B = h.trim(B)
							}
						}
						J[D[z] || z.toLowerCase()] = B
					}
				}
			}
			return J
		}
		function n(C, z) {
			if (z) {
				var D = c[C];
				if (D) {
					D(z)
				}
				var A = z.errInfo, B = z, p = B;
				if (!A) {
					A = {
						no : z.err_no,
						msg : z.err_msg || ""
					};
					delete B.err_no;
					delete B.err_msg;
					p = {
						data : B,
						errInfo : w(C, A, B)
					}
				} else {
					B.errInfo = w(C, A, B)
				}
				return p
			}
			return z
		}
		function w(D, A, C) {
			var p = j[b[D] || D];
			if (p && A && (A.no != 0)) {
				var B = p[A.no] || p["-1"];
				if (B) {
					var E = B.msg;
					if (E && (E.indexOf("#{") >= 0)) {
						if (D == "login" && (A.no == 110024)) {
							var z = g + "/v2/?regnotify&needresend=true&tpl="
									+ encodeURIComponent(v.product) + "&user="
									+ encodeURIComponent(C.mail) + "&u="
									+ encodeURIComponent(C.u);
							E = h.format(E, {
										gotourl : z
									})
						} else {
							E = h.format(E, C || {})
						}
					}
					A.msg = E;
					A.field = B.field
				}
			}
			return A
		}
		for (var k in s) {
			if (s.hasOwnProperty(k)) {
				x[k] = f(k, s[k])
			}
		}
		for (var k in l) {
			if (l.hasOwnProperty(k)) {
				x[k] = f(k, l[k], true)
			}
		}
		function a(z) {
			if (z) {
				var B = z.errInfo, C = z;
				if (!B) {
					for (var D in z) {
						if (z.hasOwnProperty(D)) {
							var A = z[D];
							if (A) {
								z[D] = decodeURIComponent(A)
							}
						}
					}
				}
				if (!B) {
					B = {
						no : z.err_no,
						msg : z.err_msg || ""
					};
					delete C.err_no;
					delete C.err_msg;
					z = {
						data : C,
						errInfo : B
					}
				}
			}
			return z
		}
		x.jsonp = function(p, z) {
			if (p.indexOf("http") != 0) {
				p = g + p
			}
			z = z || {};
			z.apiver = "v3";
			z.tt = new Date().getTime();
			return o.jsonp(p, z, {
						charset : "utf-8",
						processData : function(A) {
							return a(A)
						}
					})
		};
		x.post = function(p, z) {
			z = z || {};
			z.staticpage = z.staticpage || v.staticPage;
			z.charset = z.charset || v.charset || document.characterSet
					|| document.charset || "";
			z.token = z.token || v.token;
			z.tpl = z.tpl || v.product;
			return o.submit(g + p, z, {
						charset : "utf-8",
						processData : function(A) {
							return a(A)
						}
					})
		};
		x.request = o
	})(passport.data);
	var passport = passport || window.passport || {};
	passport.hook = passport.hook || {};
(function(g) {
		var f = window, b = window.document, d = window.document.body, l = window.document.documentElement, e = {
			_createScriptTag : function(n, m, o) {
				n.setAttribute("type", "text/javascript");
				o && n.setAttribute("charset", o);
				n.setAttribute("src", m);
				b.getElementsByTagName("head")[0].appendChild(n)
			},
			_removeScriptTag : function(n) {
				if (n.clearAttributes) {
					n.clearAttributes()
				} else {
					for (var m in n) {
						if (n.hasOwnProperty(m) && "parentNode" != m) {
							delete n[m]
						}
					}
				}
				if (n && n.parentNode) {
					n.parentNode.removeChild(n)
				}
				n = null
			},
			on : function(o, m, n) {
				if (o.addEventListener) {
					o.addEventListener(m, n, false)
				} else {
					if (o.attachEvent) {
						o.attachEvent("on" + m, n)
					}
				}
			},
			unon : function(o, m, n) {
				if (o.removeEventListener) {
					o.removeEventListener(m, n, false)
				} else {
					if (o.detachEvent) {
						o.detachEvent("on" + m, n)
					}
				}
			},
			getSize : function() {
				return {
					t : (d.scrollTop || l.scrollTop),
					l : (d.scrollLeft || l.scrollLeft),
					w : (l.clientWidth || d.clientWidth),
					h : (f.innerHeight || l.clientHeight || d.clientHeight)
				}
			},
			getEleWidth : function(n) {
				var m;
				if (n.style.width) {
					sizeelem.style.width
				}
				if (n.currentStyle) {
					return n.currentStyle.width
				}
				if (document.defaultView
						&& document.defaultView.getComputedStyle) {
					return document.defaultView.getComputedStyle(n, "")
							.getPropertyValue("width")
				}
			},
			getEleHeight : function(n) {
				var m;
				if (n.style.height) {
					sizeelem.style.height
				}
				if (n.currentStyle) {
					return n.currentStyle.height
				}
				if (document.defaultView
						&& document.defaultView.getComputedStyle) {
					return document.defaultView.getComputedStyle(n, "")
							.getPropertyValue("height")
				}
			},
			getPosition : function(C) {
				var F = e.getSize(), n = C, A = {
					t : 0,
					l : 0
				}, m = /gecko/.test(navigator.userAgent), z = function(s, o) {
					A.t += s, A.l += o
				};
				if (n && n != d) {
					if (n.getBoundingClientRect) {
						var B = n.getBoundingClientRect(), D = C.ownerDocument, t = D.body, q = D.documentElement, p = q.clientTop
								|| t.clientTop || 0, x = q.clientLeft
								|| t.clientLeft || 0;
						if (B.top == B.bottom) {
							var r = n.style.display;
							n.style.display = "block";
							n.style.display = r
						}
						z(B.top + F.t - p, B.left + F.l - x)
					} else {
						var y = b.defaultView;
						while (n) {
							z(n.offsetTop, n.offsetLeft);
							var w = y.getComputedStyle(n, null);
							if (m) {
								var v = parseInt(
										w.getPropertyValue("border-left-width"),
										10)
										|| 0, E = parseInt(
										w.getPropertyValue("border-top-width"),
										10)
										|| 0;
								z(E, v);
								if (n != C
										&& w.getPropertyValue("overflow") != "visible") {
									z(E, v)
								}
							}
							n = n.offsetParent
						}
						n = C.parentNode;
						while (n && n != d) {
							z(-n.scrollTop, -n.scrollLeft);
							n = n.parentNode
						}
					}
				}
				return A
			},
			children : function(o) {
				for (var m = [], n = o.firstChild; n; n = n.nextSibling) {
					if (n.nodeType == 1) {
						m.push(n)
					}
				}
				return m
			},
			generateRandom : function(v, w) {
				var o = v.length;
				var q = "";
				for (var p = 1; p <= w; p++) {
					var t = Math.floor(o * Math.random());
					q = q + v.charAt(t)
				}
				return q
			},
			getMousePos : function(m) {
				if (m.pageX || m.pageY) {
					return {
						x : m.pageX,
						y : m.pageY
					}
				}
				if (b.documentElement && b.documentElement.scrollTop) {
					return {
						x : m.clientX + b.documentElement.scrollLeft
								- b.documentElement.clientLeft,
						y : m.clientY + b.documentElement.scrollTop
								- b.documentElement.clientTop
					}
				} else {
					if (b.body) {
						return {
							x : m.clientX + d.scrollLeft - d.clientLeft,
							y : m.clientY + d.scrollTop - d.clientTop
						}
					}
				}
			},
			getViewHeight : function() {
				var m = b.compatMode == "BackCompat"
						? b.body
						: b.documentElement;
				return m.clientHeight
			},
			getScrollTop : function() {
				return window.pageYOffset || b.documentElement.scrollTop
						|| d.scrollTop
			}
		};
		var k = {}, j = "", c = "", a = {}, h = {};
		h.loaded = {};
		h.email = {};
		h.userName = {};
		h.phone = {};
		h.smscode = {};
		h.verifyCode = {};
		h.password = {};
		h.submit = {};
		g.reg = {
			getApiInfo : function(o, n) {
				_hiddenFields = document
						.getElementById(o._eid + "hiddenFields");
				a.emailEle = document.getElementById(o._eid + "email");
				a.userNameEle = document.getElementById(o._eid + "userName");
				a.phoneEle = document.getElementById(o._eid + "phone");
				a.smsCodeEle = document.getElementById(o._eid + "smscode");
				a.verifyCodeEle = document
						.getElementById(o._eid + "verifyCode");
				a.passwordEle = document.getElementById(o._eid + "password");
				a.submitEle = document.getElementById(o._eid + "submit");
				function m(r) {
					var r = r || window.event;
					var q = e.getMousePos(r);
					if (q.x > 0 && q.y > 0) {
						e.unon(document, "mousemove", m);
						h.loaded.n = "loaded";
						h.loaded.x = q.x;
						h.loaded.y = q.y;
						h.loaded.t1 = new Date().getTime()
					}
				}
				e.on(document, "mousemove", m);
				for (var p in a) {
					(function(q) {
						if (q) {
							e.on(q, "focus", function(s) {
										var t = new Date().getTime(), r = q.name
												|| q.type;
										if (typeof(h[r]) == "object" && !h[r].w) {
											h[r].w = e.getEleWidth(q).replace(
													/[^\d]/g, "");
											h[r].h = e.getEleHeight(q).replace(
													/[^\d]/g, "")
										}
									});
							e.on(q, "click", function(v) {
								var w = new Date().getTime(), r = e
										.getMousePos(v), t = e.getPosition(q), s = q.name
										|| q.type;
								if (typeof(h[s]) == "object" && !h[s].t1) {
									h[s].n = s;
									h[s].x = r.x - t.l;
									h[s].y = r.y - t.t;
									h[s].t1 = w
								}
							});
							e.on(q, "keydown", function(s) {
										var t = new Date().getTime(), r = q.name
												|| q.type;
										if (typeof(h[r]) == "object"
												&& !h[r].t2) {
											h[r].t2 = t
										}
									});
							e.on(q, "blur", function(s) {
										var t = new Date().getTime(), r = q.name
												|| q.type;
										if (typeof(h[r]) == "object"
												&& !h[r].t3) {
											h[r].t3 = t
										}
									})
						}
					})(a[p])
				}
				baidu(_hiddenFields).insertHTML(
						"beforeEnd",
						'<input type="hidden" name="sloc" value id="' + o._eid
								+ 'sloc">');
				return {
					preventEvent : false,
					preventDefault : false
				}
			},
			beforeSubmit : function(o, n) {
				if (h.loaded) {
					h.loaded.t3 = new Date().getTime();
					var m = "";
					for (var p in h) {
						m = m + p + "," + h[p].w + "," + h[p].h + "," + h[p].x
								+ "," + h[p].y + "," + h[p].t1 + "," + h[p].t2
								+ "," + h[p].t3 + "."
					}
					if (baidu("#" + o.guid + "__sloc")[0].name == "sloc") {
						baidu("#" + o.guid + "__sloc")[0].value = m.replace(
								/undefined/g, "")
					}
				}
				return {
					preventEvent : false,
					preventDefault : false
				}
			}
		}
	})(passport.hook);
	magic.passport = baidu.lang.createClass(function() {
				this._validateInfo = {}
			}, {
				type : "magic.passport",
				superClass : magic.Base
			}).extend({
		_getRegularField : function(b) {
			var c = b.pwd ? "password" : "text", d = this, a = b.maxLength
					? 'maxlength="' + b.maxLength + '"'
					: "", e = b.tip ? b.tip : "", f = b.field == "verifycode"
					? "none"
					: "block";
			var g = '<p id="'
					+ d.$getId(b.field + "Wrapper")
					+ '" class="pass-form-item pass-form-item-'
					+ b.field
					+ '" style="display:'
					+ f
					+ '"><label for="'
					+ d.$getId(b.field)
					+ '" id="'
					+ d.$getId(b.field + "Label")
					+ '" class="pass-label pass-label-'
					+ b.field
					+ '">'
					+ b.label
					+ '</label><input id="'
					+ d.$getId(b.field)
					+ '" type="'
					+ c
					+ '" name="'
					+ b.field
					+ '" class="pass-text-input pass-text-input-'
					+ b.field
					+ '" '
					+ a
					+ " />"
					+ (!b.noError ? '<span id="' + d.$getId(b.field + "Error")
							+ '" class="pass-item-error pass-item-error-'
							+ b.field + '"></span>' : "")
					+ (b.hasSucc ? '<span id="' + d.$getId(b.field + "Succ")
							+ '" class="pass-item-succ pass-item-succ-'
							+ b.field + '" style="display:none;"></span>' : "")
					+ '<span id="' + d.$getId(b.field + "Tip")
					+ '" class="pass-item-tip pass-item-tip-' + b.field
					+ '" style="display:none"><span id="'
					+ d.$getId(b.field + "TipText") + '">' + e
					+ "</span></span></p>";
			return g
		},
		_getHiddenField : function(a) {
			var c = this, d, e = '<p id="' + c.$getId("hiddenFields")
					+ '" style="display:none">';
			for (var b in a) {
				if (a.hasOwnProperty(b)) {
					if (typeof(a[b]) == "string") {
						d = a[b].replace(/</g, "&lt;").replace(/>/g, "&gt;")
								.replace(/"/g, "&quot;").replace(/\x22/g,
										"&quot;").replace(/\x27/g, "&#39;")
					} else {
						d = a[b]
					}
					e += '<input type="hidden" id="' + c.$getId(b) + '" name="'
							+ b + '" value="' + d + '" />'
				}
			}
			e += "</p>";
			return e
		},
		_setEvent : function() {
			var c = this, a = this.getElement();
			var b = function(d) {
				c._eventHandler.entrance.apply(c, [d])
			};
			baidu(c.getElement("form")).on("submit", b);
			baidu(c.getElement("license")).on("click", b);
			baidu(c.getElement("verifyCodeChange")).on("click", b);
			baidu(c.getElement("verifyCodeSend")).on("click", b);
			baidu(a).delegate(".pass-suggest-item label", "click", b);
			baidu(".pass-text-input", c.getElement()).on({
						focus : b,
						blur : b,
						change : b,
						keyup : b,
						mouseover : b,
						mouseout : b
					})
		},
		_validator : {
			confStorage : {},
			builtInMsg : {
				required : "请填写%s",
				phone : "手机号码格式不正确",
				email : "邮箱格式不正确"
			},
			builtInRules : {
				required : /\S+/,
				phone : /^1[3458]\d{9}$/,
				email : /^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/
			},
			init : function(b, a) {
				this.confStorage[b.$getId()] = a
			},
			validate : function(f, h, d) {
				var o = f.getElement(h), a = {
					field : h
				};
				if (!o || o.offsetHeight == 0) {
					return false
				}
				var l = o.value, e = this.confStorage[f.$getId()][h], m = e.rules;
				for (var c = 0, b = m.length; c < b; c++) {
					var k = m[c], g = this.builtInRules[k], n;
					if (Object.prototype.toString.call(g).toLowerCase() == "[object function]") {
						n = g.call(f, o)
					} else {
						n = new RegExp(g).test(l)
					}
					if (!n) {
						a.error = true;
						f._validateInfo[h] = 0;
						a.msg = this.builtInMsg[k].replace(/\%s/, e.desc);
						f._validateError(a);
						d.error(a);
						return
					}
				}
				if (!e.asyncRule) {
					a.error = false;
					f._validateInfo[h] = 1;
					f._validateSuccess(a);
					d.success(a)
				} else {
					e.asyncRule.call(f, {
								success : function() {
									a.error = false;
									f._validateInfo[h] = 1;
									f._validateSuccess(a);
									d.success(a)
								},
								error : function(j) {
									a.error = true;
									f._validateInfo[h] = 0;
									a.msg = j.msg;
									f._validateError(a);
									d.error(a)
								}
							})
				}
			},
			validateAll : function(g, f, b) {
				var k = this.confStorage[g.$getId()], a = 0, h = false, e = false, l = [], j = this
						._getActiveValidate(g, true);
				for (var d in k) {
					if (e) {
						break
					}
					this.validate(g, d, {
								success : function(m) {
									a++;
									l.push(m);
									if (a == j) {
										c()
									}
								},
								error : function(m) {
									h = true;
									if (b) {
										c();
										return
									}
									a++;
									l.push(m);
									if (a == j) {
										c()
									}
								}
							})
				}
				function c() {
					e = true;
					if (h) {
						f && f.error(l)
					} else {
						f && f.success(l)
					}
				}
			},
			_getActiveValidate : function(e, d) {
				var c = this.confStorage[e.$getId()], a = [];
				for (var b in c) {
					var f = e.getElement(b);
					if (!f || f.offsetHeight == 0) {
						continue
					}
					a.push(f)
				}
				return d ? a.length : a
			},
			addRule : function(a, c) {
				var b = {};
				b[a] = c;
				baidu.extend(this.builtInRules, b)
			},
			addMsg : function(b, c) {
				var a = {};
				a[b] = c;
				baidu.extend(this.builtInMsg, a)
			}
		},
		validate : function(d, c) {
			var b = this;
			var a = b.fireEvent("beforeValidate", {
						validate : {
							field : d,
							ele : baidu(b.getElement(d))
						}
					});
			if (!a) {
				return
			}
			b._validator.validate(b, d, {
						success : function(f) {
							var e = b.fireEvent("validateSuccess", {
										validate : f
									});
							if (!e) {
								return
							}
							c && c.success && c.success(f)
						},
						error : function(f) {
							var e = b.fireEvent("validateError", {
										validate : f
									});
							if (!e) {
								return
							}
							c && c.error && c.error(f)
						}
					})
		},
		validateAll : function(d, a) {
			var c = this;
			if (typeof d == "boolean") {
				a = d
			} else {
				a = a ? a : false
			}
			var b = c.fireEvent("beforeValidateAll");
			if (!b) {
				return
			}
			c._validator.validateAll(c, {
						success : function(f) {
							var e = c.fireEvent("validateAllSuccess", {
										validates : f
									});
							if (!e) {
								return
							}
							d && d.success && d.success(f)
						},
						error : function(f) {
							var e = c.fireEvent("validateAllError", {
										validates : f
									});
							if (!e) {
								return
							}
							d && d.error && d.error(f)
						}
					}, a)
		},
		getValidateStatus : function(a) {
			return this._validateInfo.hasOwnProperty(a)
					? this._validateInfo[a]
					: -1
		},
		setValidateSuccess : function(b) {
			var a = this;
			a._validateInfo[b] = 1;
			a._validateSuccess({
						field : b
					})
		},
		setValidateError : function(b, c) {
			var a = this;
			a._validateInfo[b] = 0;
			a._validateError({
						field : b,
						msg : c
					})
		},
		setGeneralError : function(a) {
			this.getElement("error").innerHTML = a
		},
		clearGeneralError : function() {
			this.getElement("error").innerHTML = ""
		},
		hide : function() {
			this.getElement().style.display = "none"
		},
		show : function() {
			this.getElement().style.display = "block"
		},
		_hook : function(b, a) {
			if (passport.hook && passport.hook[this.module]
					&& passport.hook[this.module][b]) {
				return passport.hook[this.module][b](this, a)
			} else {
				return {
					preventDefault : false,
					preventEvent : false
				}
			}
		},
		fireEvent : function(a, c) {
			var b = this._hook(a, c), d = true;
			if (!b.preventEvent) {
				d = this.fire(a, c)
			}
			return !b.preventDefault && d
		}
	});
	magic.passport.reg = baidu.lang.createClass(function(a) {
		var b = this;
		b.config = {
			isPhone : false,
			userName : false,
			staticPage : "",
			u : "",
			retu : "",
			passwordConfirm : false,
			product : "",
			charset : "",
			lang : "zh-CN"
		};
		baidu.object.extend(b.config, a);
		b.config.passwordConfirm = false;
		this.module = "reg";
		b.constant = {
			CONTAINER_CLASS : "tang-pass-reg",
			FOCUS_CLASS : "pass-text-input-focus",
			HOVER_CLASS : "pass-text-input-hover",
			ERROR_CLASS : "pass-text-input-error",
			DISABLED_CLASS : "pass-text-input-disabled",
			VERIFYCODE_URL_PREFIX : "https://passport.baidu.com/cgi-bin/genimage?",
			BLANK_IMG_URL : passport.apiDomain.staticDomain
					+ "/passApi/img/small_blank_9dbbfbb1.gif",
			PROTOCAL_URL : "http://passport.baidu.com/protocal.html",
			MODIFY_PWD_URL_PREFIX : "https://passport.baidu.com/forcsdnpasschange"
		};
		b.lang = {
			"zh-CN" : {
				captcha : "\u9A8C\u8BC1\u7801",
				captchaAlt : "\u9A8C\u8BC1\u7801\u56FE\u7247",
				captchaChange : "\u770B\u4E0D\u6E05\uFF1F",
				captchaTip : "\u8BF7\u8F93\u5165\u56FE\u7247\u4E2D\u7684\u5B57\u7B26\uFF0C\u4E0D\u533A\u5206\u5927\u5C0F\u5199",
				agree : "\u6211\u5DF2\u9605\u8BFB\u5E76\u63A5\u53D7",
				password : "\u5BC6\u7801",
				baiduUserProtocal : "\u300A\u767E\u5EA6\u7528\u6237\u534F\u8BAE\u300B",
				getSMSKey : "\u514D\u8D39\u83B7\u53D6\u77ED\u4FE1\u6FC0\u6D3B\u7801",
				register : "\u6CE8\u518C",
				strength : "\u5F3A\u5EA6\uFF1A",
				strengthTip : "\u5BC6\u7801\u957F\u5EA66~14\u4F4D\uFF0C\u5B57\u6BCD\u533A\u5206\u5927\u5C0F\u5199",
				phoneNum : "\u624B\u673A\u53F7",
				phoneNumTip : "\u8BE5\u624B\u673A\u53F7\u5373\u662F\u60A8\u7684\u767B\u5F55\u8D26\u53F7\uFF0C\u5176\u4ED6\u7528\u6237\u4E0D\u53EF\u89C1",
				SMSKey : "\u77ED\u4FE1\u6FC0\u6D3B\u7801",
				SMSKeyTip : "\u8BF7\u8F93\u5165\u60A8\u624B\u673A\u77ED\u4FE1\u4E2D\u7684\u6FC0\u6D3B\u7801",
				SMSKeySendTip : "\u77ED\u4FE1\u6FC0\u6D3B\u7801\u5DF2\u53D1\u9001\uFF0C\u8BF7\u60a8\u572830\u5206\u949F\u5185\u586B\u5199",
				SMSKeyResendTip : "\u79D2\u540E\u91CD\u65B0\u83B7\u53D6\u6FC0\u6D3B\u7801",
				email : "\u90AE\u7BB1",
				emailTip : "\u8BF7\u8F93\u5165\u5E38\u7528\u90AE\u7BB1\uFF0C\u901A\u8FC7\u9A8C\u8BC1\u540E\u53EF\u7528\u4E8E\u767B\u5F55\u548C\u627E\u56DE\u5BC6\u7801",
				userName : "\u7528\u6237\u540D",
				userNameTip : "\u6B64\u540D\u5B57\u5C06\u4F1A\u88AB\u522B\u7684\u7528\u6237\u770B\u5230\uFF0C\u586B\u5199\u540E\u65E0\u6CD5\u4FEE\u6539",
				confirmPassword : "\u786E\u8BA4\u5BC6\u7801",
				mailLengthError : "\u90ae\u7bb1\u8fc7\u957f\uff0c\u8bf7\u91cd\u65b0\u8f93\u5165",
				mainEmailError : "\u4E3A\u4E86\u786E\u4FDD\u60A8\u80FD\u53CA\u65F6\u6536\u5230\u90AE\u4EF6\uFF0C\u8BF7\u4F7F\u7528\u4E3B\u6D41\u90AE\u7BB1",
				pwdCharError : "\u5bc6\u7801\u4ec5\u652f\u6301\u6570\u5b57\uff0c\u5b57\u6bcd\u548c\u7b26\u53f7\uff0c\u4e14\u5bc6\u7801\u4e2d\u4e0d\u80fd\u542b\u6709\u7a7a\u683c",
				matchPwdError : "\u5BC6\u7801\u4E0E\u786E\u8BA4\u5BC6\u7801\u4E0D\u4E00\u81F4",
				pwdLengthError : "\u5bc6\u7801\u5fc5\u987b\u75316-14\u4e2a\u5b57\u7b26\u7ec4\u6210",
				checkLicenseError : "\u60A8\u8FD8\u672A\u63A5\u53D7\u767E\u5EA6\u7528\u6237\u534F\u8BAE",
				userNameRulesError : "\u4ec5\u652f\u6301\u4e2d\u82f1\u6587\u3001\u6570\u5b57\u548c\u4e0b\u5212\u7ebf\uff0c\u4e14\u4e0d\u80fd\u4e3a\u7eaf\u6570\u5b57",
				weakPwdError : "\u60a8\u7684\u5bc6\u7801\u592a\u8fc7\u7b80\u5355\uff0c\u8bf7\u4f7f\u7528\u5b57\u6bcd\u548c\u6570\u5b57\u7684\u7ec4\u5408\uff0c\u5426\u5219\u65e0\u6cd5\u6ce8\u518c\u6210\u529f",
				userNameExistsError : "\u6b64\u7528\u6237\u540d\u5df2\u88ab\u6ce8\u518c",
				weak : "\u5F31",
				middle : "\u4E2D",
				strong : "\u5F3A"
			}
		}[b.config.lang];
		b.initTime = new Date().getTime();
		passport.data.setContext(baidu.extend({}, b.config))
	}, {
		type : "magic.passport.reg",
		superClass : magic.passport
	}).extend({
		_getIrregularField : function(c) {
			var b = this, a = {
				verifyCode : '<p id="'
						+ b.$getId("verifyCodeImgWrapper")
						+ '" class="pass-form-item pass-form-item-verifyCode" style="display:none"><label for="'
						+ b.$getId("verifyCode")
						+ '" id="'
						+ b.$getId("verifyCodeLabel")
						+ '" class="pass-label pass-label-verifyCode">'
						+ b.lang.captcha
						+ '</label><input id="'
						+ b.$getId("verifyCode")
						+ '" type="text" name="verifyCode" class="pass-text-input pass-text-input-verifyCode" maxlength="4" /><span><img id="'
						+ b.$getId("verifyCodeImg")
						+ '" title="'
						+ b.lang.captchaAlt
						+ '" alt="'
						+ b.lang.captchaAlt
						+ '" class="pass-verifyCode" src="'
						+ b.constant.BLANK_IMG_URL
						+ '" /></span><a id="'
						+ b.$getId("verifyCodeChange")
						+ '" href="#" class="pass-change-verifyCode">'
						+ b.lang.captchaChange
						+ '</a><span id="'
						+ b.$getId("verifyCodeError")
						+ '" class="pass-item-error pass-item-error-verifyCode"></span><span id="'
						+ b.$getId("verifyCodeTip")
						+ '" class="pass-item-tip pass-item-tip-verifyCode" style="display:none;"><span id="'
						+ b.$getId("verifyCodeTipText") + '">'
						+ b.lang.captchaTip + "</span></span></p>",
				generalError : '<p id="' + b.$getId("errorWrapper")
						+ '" class="pass-generalErrorWrapper"><span id="'
						+ b.$getId("error")
						+ '" class="pass-generalError"></span></p>',
				suggestName : '<div id="' + b.$getId("suggestNameWrapper")
						+ '" class="pass-suggest-name"></div>',
				isAgree : '<p id="'
						+ b.$getId("isAgreeWrapper")
						+ '" class="pass-form-item pass-form-item-isAgree"><input name="isAgree" id="'
						+ b.$getId("isAgree")
						+ '" type="checkbox" checked="checked" class="pass-checkbox-input pass-checkbox-isAgree" /><label for="'
						+ b.$getId("isAgree") + '">' + b.lang.agree
						+ '</label><a target="_blank" href="'
						+ b.constant.PROTOCAL_URL + '">'
						+ b.lang.baiduUserProtocal + "</a></span></p>",
				submit : '<p id="'
						+ b.$getId("submitWrapper")
						+ '" class="pass-form-item pass-form-item-submit"><input id="'
						+ b.$getId("submit")
						+ '" type="submit" value="'
						+ b.lang.register
						+ '" class="pass-button pass-button-submit" /><span id="'
						+ b.$getId("isAgreeError")
						+ '" class="pass-item-error pass-item-error-isAgree"></span></p>',
				tip : '<div id="'
						+ b.$getId("tip")
						+ '" class="pass-pop-tip" style="display:none"><div class="pass-pop-tip-header"></div><div class="pass-pop-tip-container"><div class="pass-pop-tip-body"><div class="pass-pop-tip-content" id="'
						+ b.$getId("tipContainer")
						+ '"></div></div></div></div>',
				verifyCodeSend : '<p id="'
						+ b.$getId("verifyCodeSendWrapper")
						+ '" class="pass-form-item pass-form-item-verifyCodeSend"><input id="'
						+ b.$getId("verifyCodeSend")
						+ '" type="button" value="'
						+ b.lang.getSMSKey
						+ '" class="pass-button pass-button-verifyCodeSend" /><span id="'
						+ b.$getId("verifyCodeSendError")
						+ '" class="pass-item-error pass-item-error-verifyCodeSend"></span><span id="'
						+ b.$getId("verifyCodeSendTip")
						+ '" class="pass-item-tip pass-item-tip-verifyCodeSend"></span></p>',
				strengthTip : '<span id="'
						+ b.$getId("strengthTip")
						+ '"><span class="pwd-strength clearfix"><span class="strength-title">'
						+ b.lang.strength
						+ '</span><span id="'
						+ b.$getId("strengthTipText")
						+ '" class="strength-value"></span><span class="strength-bg"><span class="strength-inner" id="'
						+ b.$getId("strengthTipPic")
						+ '"></span></span></span><span class="strength-explain">'
						+ b.lang.strengthTip + "</span></span>"
			};
			return a[c]
		},
		_getTemplate : function(a) {
			var f = this, b = '<form autocomplete="off" id="'
					+ f.$getId("form") + '" method="POST">', e = {
				retu : f.config.retu,
				u : f.config.u,
				suggestIndex : "",
				suggestType : "",
				codeString : "",
				staticPage : f.config.staticPage,
				selectedSuggestName : ""
			}, c = [];
			if (f.config.isPhone) {
				c.push({
							field : "phone",
							label : f.lang.phoneNum,
							tip : f.lang.phoneNumTip,
							maxLength : 11,
							hasSucc : true
						});
				c.push({
							field : "smsCode",
							label : f.lang.SMSKey,
							tip : f.lang.SMSKeyTip
						})
			} else {
				c.push({
							field : "email",
							label : f.lang.email,
							tip : f.lang.emailTip,
							hasSucc : true
						})
			}
			if (f.config.userName) {
				c.push({
							field : "userName",
							label : f.lang.userName,
							tip : f.lang.userNameTip,
							hasSucc : true
						})
			}
			c.push({
						field : "password",
						pwd : true,
						label : f.lang.password,
						hasSucc : true
					});
			if (f.config.passwordConfirm) {
				c.push({
							field : "verifyPass",
							pwd : true,
							label : f.lang.confirmPassword,
							hasSucc : true
						})
			}
			b += f._getIrregularField("generalError");
			b += f._getHiddenField(e);
			for (var d = 0; d < c.length; d++) {
				b += f._getRegularField(c[d]);
				if (c[d].field == "phone") {
					b += f._getIrregularField("verifyCodeSend")
				}
			}
			if (!f.config.isPhone) {
				b += f._getIrregularField("verifyCode")
			}
			b += f._getIrregularField("isAgree");
			b += f._getIrregularField("submit");
			b += f._getIrregularField("tip");
			b += "</form>";
			return b
		},
		getVerifyCode : function(a) {
			var b = this;
			if (a && a.length) {
				b.getElement("verifyCodeImgWrapper").style.display = "block";
				b.getElement("verifyCodeImg").src = b.constant.VERIFYCODE_URL_PREFIX
						+ a;
				b.getElement("codeString").value = a
			} else {
				passport.data.getVerifyCodeStr().success(function(c) {
					if (c.errInfo.no == 0) {
						b.getElement("verifyCodeImgWrapper").style.display = "block";
						b.getElement("verifyCodeImg").src = b.constant.VERIFYCODE_URL_PREFIX
								+ c.data.verifyStr;
						b.getElement("codeString").value = c.data.verifyStr
					}
				})
			}
		},
		render : function(e) {
			var c = this;
			if (!c.getElement()) {
				c.$mappingDom("", e || document.body)
			}
			var d = baidu(c.getElement()), b = c._getTemplate();
			d.addClass(c.constant.CONTAINER_CLASS);
			d.append(baidu(b));
			var a = c.fireEvent("render");
			if (!a) {
				return
			}
			c._initApi();
			c._setValidator();
			c._setEvent();
			c._setSuggestion();
			c.suggestion && c.suggestion.hide();
			c._setPwdStrengthTip()
		},
		_initApi : function(b) {
			var a = this;
			a.initTime = new Date().getTime();
			passport.data.getApiInfo({
						apiType : a.config.isPhone ? "regPhone" : "reg"
					}).success(function(d) {
						var f = a.fireEvent("getApiInfo", {
									rsp : d
								});
						if (!f) {
							return
						}
						if (d.errInfo.no == 0) {
							var e = d.data.token, c = d.data.codeString;
							passport.data.setContext({
										token : e
									});
							if (c && c.length) {
								a.getVerifyCode(c)
							}
							b && b.success(d)
						}
					})
		},
		_setSuggestion : function() {
			var b = this;
			if (!b.getElement("email") || !magic.setup.suggestion) {
				return
			}
			var a = {
				getData : function(d) {
					var g = [], e = b.mainEmailSP, c = (c = d.match(/(.*)@/))
							? c[1]
							: d, f = (f = d.match(/\@(.*)$/)) ? f[1] : false;
					baidu.each(e, function(h, j) {
								if (f && ~j.indexOf(f)) {
									g.push(c + "@" + j)
								} else {
									if (!f) {
										g.push(c + "@" + j)
									}
								}
							});
					this.receiveData(d, g)
				}
			};
			b.suggestion = magic.setup.suggestion(b.$getId("email"), a);
			b.suggestion.on("confirm", function() {
						b.validate("email")
					});
			b.suggestion.on("highlight", function() {
						b.suggestionHighlight = true
					});
			b.suggestion.on("clearhighlight", function() {
						b.suggestionHighlight = false
					})
		},
		_setValidator : function() {
			var c = this, b = c.mainEmailSP = ["163.com", "qq.com",
					"gmail.com", "yahoo.com.cn", "sohu.com", "126.com",
					"sina.com", "hotmail.com"], a = b.join(")|(\\@").replace(
					/\./g, "\\.");
			a = "((\\@" + a + "))$";
			a = "^([a-zA-Z0-9_\\.\\-\\+])+" + a;
			c._validator.addRule("mailLength", function(d) {
						return String(d.value).length <= 60
					});
			c._validator.addMsg("mailLength", c.lang.mailLengthError);
			c._validator.addRule("matchedPwd", function(d) {
						return d.value === this.getElement("password").value
					});
			c._validator.addMsg("matchedPwd", c.lang.matchPwdError);
			c._validator.addRule("pwdChar", function(d) {
				//return /^([0-9a-zA-Z\_`!~@#$%^*+=,.?;'":)(}{/\\\|<>&\[\-]|\])+$/.test(d.value)
				return d.value
			});
			c._validator.addMsg("pwdChar", c.lang.pwdCharError);
			c._validator.addRule("pwdLength", function(e) {
						var d = e.value.length;
						return (d <= 14 && d >= 6)
					});
			c._validator.addMsg("pwdLength", c.lang.pwdLengthError);
			c._validator.addRule("checkedLicense", function(d) {
						return d.checked
					});
			c._validator.addMsg("checkedLicense", c.lang.checkLicenseError);
			c._validator.addRule("userNameLength", function(e) {
						var d = baidu.string.getByteLength(e.value);
						return d <= 14 && !/^\d+$/.test(e.value)
					});
			c._validator.addMsg("userNameLength", c.lang.userNameRulesError);
			c.validateRules = {
				email : {
					rules : ["required", "mailLength", "email"],
					asyncRule : c._asyncValidate.checkEmail,
					desc : c.lang.email
				},
				phone : {
					rules : ["required", "phone"],
					asyncRule : c._asyncValidate.phoneCheck,
					desc : c.lang.phoneNum
				},
				userName : {
					rules : ["required", "userNameLength"],
					asyncRule : c._asyncValidate.checkUserName,
					desc : c.lang.userName
				},
				password : {
					rules : ["required", "pwdLength", "pwdChar"],
					asyncRule : c._asyncValidate.checkPassword,
					desc : c.lang.password
				},
				verifyPass : {
					rules : ["required", "matchedPwd"],
					desc : c.lang.confirmPassword
				},
				verifyCode : {
					rules : ["required"],
					desc : c.lang.captcha
				},
				smsCode : {
					rules : ["required"],
					desc : c.lang.SMSKey
				},
				isAgree : {
					rules : ["checkedLicense"]
				}
			};
			c._validator.init(c, c.validateRules)
		},
		_validateError : function(d, a) {
			var b = this, c = baidu(b.getElement(d.field));
			c.addClass(b.constant.ERROR_CLASS);
			baidu(b.getElement(d.field + "Succ")).hide();
			baidu(b.getElement(d.field + "Error")).show().get(0).innerHTML = d.msg;
			if (d.field != "password") {
				b._hideTip(d.field)
			} else {
				b.setPwdStrength(-1)
			}
			a && a.callback && callback()
		},
		_validateSuccess : function(d, a) {
			var b = this, c = baidu(b.getElement(d.field));
			baidu(b.getElement(d.field + "Error")).hide();
			baidu(b.getElement(d.field + "Succ")).show();
			c.removeClass(b.constant.ERROR_CLASS);
			a && a.callback && callback()
		},
		setPwdStrength : function(c) {
			var a = this, b = {
				"2" : {
					text : a.lang.weak,
					className : "weak"
				},
				"1" : {
					text : a.lang.middle,
					className : "middle"
				},
				"0" : {
					text : a.lang.strong,
					className : "strong"
				},
				"-1" : {
					text : "",
					className : ""
				}
			};
			a.getElement("strengthTipText").innerHTML = b[c].text;
			baidu(a.getElement("strengthTipPic"))
					.removeClass("weak middle strong").addClass(b[c].className)
		},
		_setPwdStrengthTip : function() {
			var b = this, a = baidu(b.getElement("strengthTip")), c = baidu(b
					.getElement("passwordTipText"));
			if (!a.length) {
				a = baidu(b._getIrregularField("strengthTip"));
				c.append(a)
			}
		},
		_resetPwdStrengthTipPos : function() {
			var a = this;
			a._hideTip("password");
			a._showTip("password")
		},
		_showTip : function(g) {
			var c = this, f = baidu(c.getElement("tipContainer")), e = baidu(c
					.getElement("tip")), d = baidu(c.getElement(g)), a = c
					.getElement(g + "TipText");
			if (!a || !a.innerHTML.length) {
				return false
			}
			f.empty().append(a);
			e.css({
						left : 420,
						top : d.offset().top
								- baidu(c.getElement()).offset().top
					});
			var b = c.fireEvent("tipShow", {
						tip : e
					});
			if (!b) {
				return
			}
			e.show()
		},
		_hideTip : function(c) {
			var b = this;
			baidu(b.getElement(c + "Tip")).append(b.getElement(c + "TipText"));
			var a = b.fireEvent("tipHide");
			if (!a) {
				return
			}
			baidu(b.getElement("tip")).hide()
		},
		_showSuggestNames : function(f, d, g) {
			var e = this;
			if (d == e.suggestListKey) {
				return
			}
			if (!baidu(e.getElement("suggestNameWrapper")).length) {
				baidu(e._getIrregularField("suggestName")).insertAfter(e
						.getElement("userNameWrapper"))
			}
			e.suggestListKey = d;
			var a = baidu(e.getElement("suggestNameWrapper"));
			if (!f || !f.length) {
				a.empty()
			} else {
				a.empty();
				for (var c = 0, b = f.length; c < b; c++) {
					a
							.append('<p class="pass-suggest-item"><label name="suggestName"><input name="suggestName" id="'
									+ e.$getId("suggestName__" + c)
									+ '" type="radio" class="pass-suggest-item-radio" value="'
									+ f[c] + '" />' + f[c] + "</label></p>")
				}
				e.getElement("suggestType").value = g
			}
			if (e.getElement("tip").style.display == "block") {
				e._resetPwdStrengthTipPos()
			}
		},
		disableSmsButton : function() {
			var e = this, h = e.getElement("verifyCodeSend"), b = e
					.getElement("verifyCodeSendError"), g = e
					.getElement("verifyCodeSendTip"), f = h.value, d, a = 60;
			baidu(h).addClass(e.constant.DISABLED_CLASS);
			h.disabled = true;
			b.innerHTML = "";
			g.innerHTML = e.lang.SMSKeySendTip;
			function c() {
				if (--a == 0) {
					h.value = f;
					baidu(h).removeClass(e.constant.DISABLED_CLASS);
					h.disabled = false;
					g.innerHTML = "";
					return
				}
				var j = arguments.callee;
				h.value = a + e.lang.SMSKeyResendTip;
				d = setTimeout(function() {
							j()
						}, 1000)
			}
			c()
		},
		_asyncValidate : {
			checkEmail : function(b) {
				var a = this, c = a.getElement("email");
				passport.data.checkMail({
							email : c.value
						}).success(function(d) {
							var e = a.fireEvent("emailCheck", {
										rsp : d
									});
							if (!e) {
								return
							}
							if (d.errInfo.no == 0) {
								b && b.success(d)
							} else {
								d.msg = d.errInfo.msg;
								b && b.error(d)
							}
						})
			},
			checkPassword : function(b) {
				var a = this, c = a.getElement("password");
				passport.data.checkPassword({
							password : c.value
						}).success(function(d) {
							var e = a.fireEvent("passwordStrengthCheck", {
										rsp : d
									});
							if (!e) {
								return
							}
							if (d.errInfo.no == 0) {
								var f = d.data.pwdWeak;
								a.setPwdStrength(f);
								if (f == 2) {
									d.msg = a.lang.weakPwdError;
									b && b.error(d)
								} else {
									b && b.success(d)
								}
							}
						})
			},
			checkUserName : function(b) {
				var a = this, c = a.getElement("userName");
				passport.data.checkUserName({
							userName : c.value
						}).success(function(d) {
					var e = a.fireEvent("userNameCheck", {
								rsp : d
							});
					if (!e) {
						return
					}
					if (d.errInfo.no == 0) {
						if (d.data.userExsit == 1) {
							d.msg = a.lang.userNameExistsError;
							b && b.error(d);
							a._showSuggestNames(d.data.suggNames, c.value,
									d.data.userType)
						} else {
							a._showSuggestNames([], c.value, d.data.userType);
							b && b.success(d)
						}
					} else {
						a._showSuggestNames([], c.value, d.data.userType);
						d.msg = d.errInfo.msg;
						b && b.error(d)
					}
				})
			},
			phoneCheck : function(b) {
				var a = this, c = this.getElement("phone");
				passport.data.checkPhone({
							phone : c.value
						}).success(function(d) {
							var e = a.fireEvent("phoneCheck", {
										rsp : d
									});
							if (!e) {
								return
							}
							if (d.errInfo.no == 0) {
								b && b.success(d)
							} else {
								d.msg = d.errInfo.msg;
								b && b.error(d)
							}
						})
			}
		},
		_eventHandler : (function() {
			var c, a = "", b = {
				focus : function(h, g) {
					var f = c.fireEvent("fieldFocus", {
								ele : this
							});
					if (!f) {
						return
					}
					this.addClass(c.constant.FOCUS_CLASS);
					this.removeClass(c.constant.ERROR_CLASS)
				},
				blur : function(h, g) {
					var f = c.fireEvent("fieldBlur", {
								ele : this
							});
					if (!f) {
						return
					}
					this.removeClass(c.constant.FOCUS_CLASS)
				},
				mouseover : function(h, g) {
					var f = c.fireEvent("fieldMouseover", {
								ele : this
							});
					if (!f) {
						return
					}
					this.addClass(c.constant.HOVER_CLASS)
				},
				mouseout : function(h, g) {
					var f = c.fireEvent("fieldMouseout", {
								ele : this
							});
					if (!f) {
						return
					}
					this.removeClass(c.constant.HOVER_CLASS)
				}
			}, d = {
				focus : {
					email : function() {
						c._showTip("email")
					},
					phone : function() {
						c._showTip("phone")
					},
					userName : function() {
						c._showTip("userName")
					},
					password : function() {
						c._showTip("password")
					},
					verifyPass : function() {
						c._showTip("verifyPass")
					},
					verifyCode : function() {
						c._showTip("verifyCode")
					},
					smsCode : function() {
						c._showTip("smsCode")
					}
				},
				blur : {
					email : function(g, f) {
						c.validate(g)
					},
					phone : function(g, f) {
						c.validate(g)
					},
					userName : function(g, f) {
						c.validate(g)
					},
					password : function(g, f) {
						c.validate(g)
					},
					verifyPass : function(g, f) {
						c.validate(g)
					},
					verifyCode : function(g, f) {
						c.validate(g)
					},
					smsCode : function(g, f) {
						c.validate(g)
					}
				},
				change : {
					email : function(g, f) {
					}
				},
				keyup : {
					password : function(h, g) {
						var f = c.getElement(h);
						if (f.value.length < 6) {
							c.setPwdStrength(-1)
						} else {
							c.validate(h)
						}
					},
					phone : function(h, g) {
						var f = c.getElement(h).value;
						if (f.length == 11) {
							c.validate(h, {
										success : function() {
										}
									})
						}
					}
				},
				click : {
					isAgree : function(g, f) {
						c.validate(g)
					},
					suggestName : function() {
						var h = this, g = h.get(0);
						if (!g.tagName || (g.tagName != "LABEL")) {
							h = h.parent()
						}
						h = h.find("input");
						var j = h.get(0).value;
						var f = c.fireEvent("selectSuggestName", {
									suggestName : j
								});
						if (!f) {
							return
						}
						baidu(c.getElement("suggestNameWrapper")).empty();
						c.getElement("userName").value = j;
						c.setValidateSuccess("userName");
						c.suggestListKey = j;
						var e = h.attr("id").match(/(\d+)$/)[1];
						c.getElement("selectedSuggestName").value = j;
						c.getElement("suggestIndex").value = e
					},
					verifyCodeChange : function(g, f) {
						c.getVerifyCode();
						f.preventDefault()
					},
					verifyCodeSend : function(h, g) {
						var f = c.getElement("phone").value;
						c.validate("phone", {
							success : function() {
								passport.data.sendPhoneCode({
											phone : f
										}).success(function(e) {
									var j = c.fireEvent("smsCodeSend", {
												rsp : e
											});
									if (!j) {
										return
									}
									if (e.errInfo.no == 0) {
										c.disableSmsButton()
									} else {
										c.getElement("verifyCodeSendError").innerHTML = e.errInfo.msg
									}
								})
							}
						})
					}
				},
				submit : function(f) {
					c.validateAll({
						success : function() {
							c.getElement("submit").focus();
							var g = c.fireEvent("beforeSubmit");
							if (!g) {
								return
							}
							var h = baidu.form.json(c.getElement("form"));
							if (c.config.userName) {
								if (h.userName != h.selectedSuggestName) {
									h.suggestIndex = "";
									h.suggestType = ""
								}
							}
							h.timeSpan = new Date().getTime() - c.initTime;
							var e = function(j) {
								if (j.errInfo.no == 0) {
									if (j.data.needToModifyPassword) {
										window.loaction.href = c.constant.MODIFY_PWD_URL_PREFIX
												+ "?u=" + u
									} else {
										var k = c.fireEvent("regSuccess", {
													rsp : j
												});
										if (!k) {
											return
										}
										window.location.href = j.data.u
									}
								} else {
									var k = c.fireEvent("regError", {
												rsp : j
											});
									if (!k) {
										return
									}
									if (j.errInfo.field) {
										c.setValidateError(j.errInfo.field,
												j.errInfo.msg)
									} else {
										c.setGeneralError(j.errInfo.msg)
									}
									if (!c.config.isPhone) {
										c.getVerifyCode()
									}
								}
							};
							if (c.config.isPhone) {
								passport.data.regPhone(h).success(e)
							} else {
								passport.data.reg(h).success(e)
							}
						},
						error : function() {
						}
					});
					f.preventDefault()
				}
			};
			return {
				entrance : function(j) {
					c = this;
					var h = baidu(j.target), g = j.target.name;
					if (!g && j.target.id) {
						var f = j.target.id.match(/\d+__(.*)$/);
						if (f) {
							g = f[1]
						}
					}
					if (!g) {
						return
					}
					if (b.hasOwnProperty(j.type)) {
						b[j.type].apply(baidu(j.target), [g, j])
					}
					if (d.hasOwnProperty(j.type)) {
						if (typeof d[j.type] == "function") {
							d[j.type].apply(baidu(j.target), [j])
						}
						if (d[j.type].hasOwnProperty(g)) {
							d[j.type][g].apply(baidu(j.target), [g, j])
						}
					}
					if (j.type == "blur") {
						c._hideTip(g)
					}
				}
			}
		})(),
		$dispose : function() {
			var a = this;
			if (a.disposed) {
				return
			}
			baidu.dom(a.getElement()).removeClass(a.constant.CONTAINER_CLASS);
			baidu.dom(a.getElement("form")).remove();
			magic.Base.prototype.$dispose.call(a)
		}
	});
	return magic;
});
